Re: [PATCHv2 2/2] pull: support rebased upstream + fetch + pull --rebase
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 12 quoted lines
> How about
>
> oldremoteref="$(git rev-list --boundary HEAD --not \
> $(git rev-list -g $remoteref | sed 's/$/^@/') |
> sed -e '/^[^-]/d' -e q)"
>
> Explanation: the "git rev-list -g $remoteref" lists the previous commits
> the remote ref pointed to, and the ^@ appended to them means all their
> parents. Now, the outer rev-list says to take everything in HEAD but
> _not_ in those parents, showing the boundary commits. The "sed" call
> lists the first such boundary commit (which must, by construction, be one
> of the commits shown by the first rev-list).
Hmm, I am not sure about that "(which must..." part. When you have
Y---X
/
B---o---o---o---Hwouldn't "rev-list --boundary H --not X^@" give B, not X nor Y?