有没有办法列出已获取但未使用 LibGit2Sharp 合并的提交?
例如,我可以运行以下 git 命令:
C:\Users\Tom\SourceLog>git log origin
commit f3beb4960b2f4bf5641d5b512b5b8c3081512a56
Author: Tom Hunter
Date: Wed Jan 9 22:58:51 2013 +0000
Rollback change to icon
Seemed to crash on windows xp for some reason..
commit d95f29a6cbfea9cb6009c3095a67d71f86d9e8bd
Author: Tom Hunter
Date: Mon Jan 7 21:34:36 2013 +0000
Updating Icon
commit 8785ed4ff3c46bef46ea6e2398c115b4b0203b2c
Author: Tom Hunter
Date: Mon Jan 7 21:22:54 2013 +0000
Fixing tests
Moved GenerateFlowDocuments method to LogEntry class.
Have somehow managed to greatly simplify tests..
...
前两个提交尚未合并到我的本地存储库中。即,如果我省略origin,这就是我得到的:
C:\Users\Tom\SourceLog>git log
commit 8785ed4ff3c46bef46ea6e2398c115b4b0203b2c
Author: Tom Hunter
Date: Mon Jan 7 21:22:54 2013 +0000
Fixing tests
Moved GenerateFlowDocuments method to LogEntry class.
Have somehow managed to greatly simplify tests..
...
下面的代码只给了我 8785ed。如何获取包含尚未合并的提交的列表?
using (var repo = new Repository(@"C:\Users\Tom\SourceLog"))
{
var c = repo.Commits.First();
}