From: Marco Costalba Date: Sat, 18 Mar 2006 07:35:19 GMT Subject: Re: How to find a revision's branch name Message-ID: In-Reply-To: <7vfylgz29x.fsf@assigned-by-dhcp.cox.net> On 3/18/06, Junio C Hamano wrote: > Marco Costalba writes: > > > Is it possible to get branch name from a revision sha? > > Something like > > > > $ git branch b14e2494b8a70737066f4ade4df1b5559e81b44b > > todo > > That is in general impossible. > > > > I need this to correctly annotate files not in HEAD > > tree. Currently qgit runs git-rev-list --header --topo-order > > --parents --remove-empty HEAD -- > > > > to get a file history. But this fails if is not found > > in HEAD. The right command to run in our case should be: > > git-rev-list --header --topo-order --parents --remove-empty > > todo -- > > ... I wonder why you care. Wouldn't this work just as well? > > $ git rev-list --header --topo-order --parents --remove-empty \ > --all -- > Yessss!!! Thanks for the fix. I missed that. Marco