From: Ivan Chernyavsky Date: Wed, 05 Aug 2015 19:48:30 GMT Subject: Re: Which branch(es) contain certain commits? (was Re: (unknown)) Message-ID: <1758741438804110@web14m.yandex.ru> In-Reply-To: Sorry for empty subject in the original mail, somehow I've deleted it and didn't even notice. 05.08.2015, 20:05, "Junio C Hamano" : > Junio C Hamano writes: > >>  I think people do things like: >> >>      git log --all --decorate --grep=... > > s/decorate/source/; sorry for the noise. Thanks Junio! I was actually considering using --source, but for me the problem is it always returns *just one* branch for every matching commit. So the caller must then use his own knowledge to deduce all branches where this branch merged. Considering following history: * b46f30e refs/heads/zzz eee | * dc0280f refs/heads/yyy ddd |/ | * 31739da refs/heads/xxx ccc |/ * a42bd23 refs/heads/master bbb * 01a8291 refs/heads/master aaa Command "git log --all --source --grep=bbb --oneline" will return: a42bd23 refs/heads/master bbb While I'm expecting something like "git branch --contains=a42bd23" output in terms of *all* topics being listed: master xxx yyy * zzz The most common use case is when support people need to quickly get at least rough idea which branches have specific ticket/CR mentioned. -- Ivan