From: Linus Torvalds Date: Sun, 02 Jul 2006 16:43:45 GMT Subject: Re: [PATCH 4/3] Fold get_merge_bases_clean() into get_merge_bases() Message-ID: 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