Re: [PATCH 4/3] Fold get_merge_bases_clean() into get_merge_bases()
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jul 2, 2006, 16:43 UTC
- Message-ID
- <Pine.LNX.4.64.0607020935460.12404@g5.osdl.org>
- In-Reply-To
- <20060702094938.GA10944@lsrfire.ath.cx>
On Sun, 2 Jul 2006, Rene Scharfe wrote:
> > Due to popular request ;-), change get_merge_bases() to be able to > clean up after itself if needed by adding a cleanup parameter.
Btw, I think the symmetric thing is still wrong.
Try this:
git rev-list ^HEAD~1 HEAD...HEAD~2
which _should_ return just HEAD ("HEAD...HEAD~2" should basically expand into "HEAD HEAD~2 ^HEAD~2")
I haven't actually tested your patch, but I think it returns HEAD and HEAD~1.
The reason? You clear UNINTERESTING as part of clear_commit_marks(), so HEAD~1, which was marked thus by the user, gets cleared of its mark as part of the get_merge_bases() invocation.
I suspect the only way to fix that is to make "get_merge_bases()" not use UNINTERESTING at all, but instead just explicitly use something like
(obj.flags & (LEFT | RIGHT)) == (LEFT | RIGHT)
instead.
Linus