From: Thomas Harning Date: Mon, 18 Aug 2008 13:37:25 GMT Subject: Re: Best method of detecting if list of commit refs is a parent Message-ID: <17B524E9-FDF9-4585-AFBD-A5304E3A4AA6@gmail.com> In-Reply-To: <7vfxp3ndec.fsf@gitster.siamese.dyndns.org> On Aug 18, 2008, at 12:41 AM, Junio C Hamano wrote: > > If you have bunch of commits A B C D E F and if you would want to know > which one of them is reachable from X, you could of course run merge- > base > once for each of A..F. Another way to do this would be to run: > > git rev-list A B C D E F ^X > > and look at the output. The ones among A..F that appear in the > output are > not reachable from X. The ones that are reachable from X do not > appear in > the output. > > This is because "rev-list" outputs everything reachable from the given > commits without ^ prefix, excluding the ones that are reacahble from > the > ones prefixed with ^. Perfect! Now... is there built-in way to invert this to list those that 'are' reachable..... Or would the inverse really end up calculating the difference between input list and output list?