Re: [Q] Determing if a commit is reachable from the HEAD ?
- From
Sitaram Chamarty <sitaramc@gmail.com>
- Date
- Jan 20, 2012, 22:50 UTC
- Message-ID
- <CAMK1S_gkZYpK3nrNMsnmFzi=tzjyEjVwOo_j4Z=d0hqjdF7r_w@mail.gmail.com>
- In-Reply-To
- <201201201433.30267.brian.foster@maxim-ic.com>
On Fri, Jan 20, 2012 at 7:03 PM, Brian Foster <brian.foster@maxim-ic.com> wrote:
Show 14 quoted lines
> > Hello, > > Whilst I have found answers to my question on the Web, > only one seems to do exactly what I want .... > > x---Y---y---y---y HEAD > / > ...--o---o---C---o---S > \ > n---n---N---*---* other > > In a script, how can I determine commit Y is reachable > from the current HEAD ? And, much more importantly
I've been using 'git rev-list HEAD..Y'. If it produces any output, Y is not reachable from HEAD (there is something in Y that is not in HEAD).