I tried looping through new LibGit2Sharp.Repository(path).Commits, but it seems it only goes through the commits in the master (or I guess wherever the HEAD points to?).
How would I loop through every commit in the repository, regardless of what branch it is in and loop through them in order of when the commits occurred (date)?
I’m doing this for a purpose like git log, to list commits regardless of the branches, in order of date.
Bonus points if I could also loop through the commits that are not referenced (i.e. if you git reset away from some commits and the commits are no longer referenced and about to get gc’d).
Thoughts?
Support for
git log --allshould be achievable with the following syntaxThe
Filteralso exposes aSortByproperty to control the ordering of the results. Default sorting (GitSortOptions.Time) will output the most recent commits first.There’s no way to access the commits in the reflog nor the dangling one (yet?). Then, no bonus points, I guess 🙂