Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: How to find a revision's branch name

From: Marco Costalba <hidden>
Date: 2016-06-15 22:42:21

On 3/18/06, Junio C Hamano [off-list ref] wrote:
Marco Costalba [off-list ref] writes:
quoted
Is it possible to get branch name from a revision sha?
Something like

$ git branch b14e2494b8a70737066f4ade4df1b5559e81b44b
todo
That is in general impossible.
quoted
I need this to correctly annotate files not in HEAD
tree. Currently qgit runs git-rev-list --header --topo-order
--parents --remove-empty HEAD -- <path>

to get a file history. But this fails if <path> 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 -- <path>
... I wonder why you care.  Wouldn't this work just as well?

        $ git rev-list --header --topo-order --parents --remove-empty \
          --all -- <path>
Yessss!!!

Thanks for the fix. I missed that.

Marco
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help