From: Andreas Schwab Date: Fri, 20 Jan 2012 14:13:58 GMT Subject: Re: [Q] Determing if a commit is reachable from the HEAD ? Message-ID: In-Reply-To: <201201201433.30267.brian.foster@maxim-ic.com> Brian Foster writes: > In a script, how can I determine commit Y is reachable > from the current HEAD ? test $(git merge-base HEAD Y) = $(git rev-parse Y) > And, much more importantly > for my purposes, that commit N is _not_-reachable from > the current HEAD ? test $(git merge-base HEAD N) != $(git rev-parse N) Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."