Re: [Q] Determing if a commit is reachable from the HEAD ?
Brian Foster <brian.foster@maxim-ic.com> 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."