libgit2/libgit2sharp — Issue #119: Enable enumerating commits not reachable and not reachable by remotes
Author: Haacked
Created: 2012-03-01 17:30:14+00:00
State: open

I need the abliity to list commits in a branch that are already "published" vs those that are not. By published, I mean commits that are reachable from a remote in the repository.

LibGit2 recently added a feature that should make this possible. https://github.com/libgit2/libgit2/pull/576

Here's a scenario to make this clear.

1. Clone repo from GitHub, make a couple commits on master. Push to GitHub.
2. Create a new branch locally, add some commits.

The new branch hasn't been pushed, so it doesn't have a remote yet. When I get a list of commits, I'd like to be able to filter out the ones that are reachable by a remote (in this case origin/master).

I separately will want to be able to get a list of commits in that branch that *are* reachable by a remote.

If this is possible today, do let me know. I know that the libgit2 folks recently added a feature to make this more efficient (in the pull request I linked to) based on the logic used within Git.