I am trying to get a proper filter to return to me all commits that have occurred since our prior release branch. This works well at the git commandline: git log release/v21.2.16..release/v21.3.2
From this, I can see all the commits that I have made since the 21.2.16 release. I have tried the following filter but the results are not the same (but the count is, which is a coincidence I believe):
var filter = new CommitFilter { SortBy = CommitSortStrategies.Reverse | CommitSortStrategies.Time, ExcludeReachableFrom = repo.Branches[_baseBranch].Tip, IncludeReachableFrom = repo.Branches[_targetBranch].Tip }; var results = repo.Commits.QueryBy(filter); foreach (var r in results) { Console.WriteLine($"{r.Sha} {r.Committer}"); commits.Add(r.Sha); } When I compare the output of the command line and the code different hashes are displayed and different committers are displayed. What is the proper filter to perform the same filter that is being done by the commandline?
https://stackoverflow.com/questions/66485230/libgit2sharp-equivalent-of-git-log-release-v21-2-16-release-v21-3-2 March 05, 2021 at 08:57AM
没有评论:
发表评论