describe fails on tagless branch

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

describe fails on tagless branch

From: Han-Wen Nienhuys <hidden>
Date: 2016-06-15 22:42:52


try 

  git init
  echo hoi > a
  git add a
  git commit -m 'add a' a
  git describe

this yields


[lilydev@haring t]$ git describe
fatal: cannot describe '3b26396bbb5f18580ffd4bc31f70ef0738ec73d6'


I would prefer it if an implicit tag INIT was supposed at the start of the
history, so we'd get

  INIT-3b2...


-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

Re: describe fails on tagless branch

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:42:52

[Cc: git@vger.kernel.org]

Han-Wen Nienhuys wrote:
try 

  git init
  echo hoi > a
  git add a
  git commit -m 'add a' a
  git describe

this yields


[lilydev@haring t]$ git describe
fatal: cannot describe '3b26396bbb5f18580ffd4bc31f70ef0738ec73d6'


I would prefer it if an implicit tag INIT was supposed at the start of the
history, so we'd get

  INIT-3b2...
_Which_ INIT? In git there can be more than one root commit. In git.git
repository mainline (maint, master, next and pu branches) has 4 roots
(plus three linear independent branches: man, html and todo, each with its
own root).

I agree that error description should probably be better: cannot describe
_why_.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

Re: describe fails on tagless branch

From: Han-Wen Nienhuys <hidden>
Date: 2016-06-15 22:42:52

Jakub Narebski escreveu:
_Which_ INIT? In git there can be more than one root commit. In git.git
I don't really care, but I would like git-describe to produce something 
useful in the absence of tags.  The -g<SHA-1> already makes the commit
uniquely identifiable.




-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help