Git development
 help / color / mirror / Atom feed
* How to find a revision's branch name
@ 2006-03-18  6:02 Marco Costalba
  2006-03-18  6:37 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Costalba @ 2006-03-18  6:02 UTC (permalink / raw)
  To: junkio; +Cc: git

In today git archive, todo branch.

$ git-rev-list -n1 --header b14e2494b8a70737066f4ade4df1b5559e81b44b
b14e2494b8a70737066f4ade4df1b5559e81b44b
tree 1baa1f8405d1fef90fe95f2477133a69adec288b
parent 8158d510c641e2354cf24a10bc3e994c7a1e3125
author Junio C Hamano <junkio@cox.net> 1137562948 -0800
committer Junio C Hamano <junkio@cox.net> 1137562948 -0800

    TODO updates 2006-01-17.

    Signed-off-by: Junio C Hamano <junkio@cox.net>


Is it possible to get branch name from a revision sha?
Something like

$ git branch b14e2494b8a70737066f4ade4df1b5559e81b44b
todo

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>

So I need to get 'todo' branch name from a given revision sha's.

BTW also git blame fails (gracefully) if revision is not in HEAD:

$ git blame b14e2494b8a70737066f4ade4df1b5559e81b44b
b14e2494b8a70737066f4ade4df1b5559e81b44b not found in HEAD


Thanks
Marco

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-18  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-18  6:02 How to find a revision's branch name Marco Costalba
2006-03-18  6:37 ` Junio C Hamano
2006-03-18  7:35   ` Marco Costalba
2006-03-18  8:31     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox