Reputation: 193
I need to present user a list of commits that are fetched, but not yet merged. This means finding wanted branch in FETCH_HEAD and showing git log <branch>..FETCH_HEAD
. How to approach the last step in libgit2? I should stop git_revwalk*
at first commit common to both <branch>
and to the pseudo-branch created by the sha tip stored in FETCH_HEAD. Does this mean that I first need to load whole <branch>
into memory? Or maybe there is other method of stopping git_revwalk*
(that was started at FETCH_HEAD tip)?
Upvotes: 0
Views: 178
Reputation: 78673
It sounds like you want to show the commit id contained in FETCH_HEAD
by git_revwalk_push
ing it. Then you would git_revwalk_hide
the commit id of the branch that you want to stop at.
This should revwalk only the range hide..show
.
Upvotes: 2