git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* v2.9.3 and v2.10.0: `name-ref' HEAD gives wrong branch name
@ 2016-09-20 16:23 Steffen Nurpmeso
  2016-09-20 18:54 ` Bryan Turner
  0 siblings, 1 reply; 7+ messages in thread
From: Steffen Nurpmeso @ 2016-09-20 16:23 UTC (permalink / raw)
  To: git

Hello again,

yah, sorry, i'm back again..
I try to find a way to find the name of the current branch in an
automated way, because i need to ensure that a commit happens on
it and no other branch.  Now the problem arises that the commit
ref at the time of that commit maybe shared in between several
different branches, but no more thereafter, of course:

  ?0[steffen@wales ]$ git branch|grep '^*'
  * stable/v14.9
  ?0[steffen@wales ]$ git name-rev --name-only HEAD
  stable/v14.8

Is there another way except looking into .git/HEAD or using sed(1)
on the output of `branch' to find the right name?
Thank you.
Ciao!

--steffen

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

end of thread, other threads:[~2016-09-21 17:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-20 16:23 v2.9.3 and v2.10.0: `name-ref' HEAD gives wrong branch name Steffen Nurpmeso
2016-09-20 18:54 ` Bryan Turner
2016-09-20 19:29   ` Steffen Nurpmeso
2016-09-21 13:43   ` Jakub Narębski
2016-09-21 14:21     ` Steffen Nurpmeso
2016-09-21 16:37     ` Junio C Hamano
2016-09-21 17:54       ` Jakub Narębski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).