From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: describe fails on tagless branch
Date: Wed, 07 Feb 2007 10:08:50 +0100 [thread overview]
Message-ID: <eqc4s4$nm9$1@sea.gmane.org> (raw)
In-Reply-To: 7vr6t2g1dt.fsf@assigned-by-dhcp.cox.net
[Cc: git@vger.kernel.org]
Junio C Hamano wrote:
> Han-Wen Nienhuys <hanwen@xs4all.nl> writes:
>
>> 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.
>
> Then you would script like this:
>
> #!/bin/sh
> git describe "$1" 2>/dev/null || git rev-parse --verify "$1"
>
> I do not think it a good idea to make "git-describe" itself do
> the above, as the user of describe may want to fall back on
> something other than "rev-parse --verify" after ||.
By the way, new git-describe gives us also number of commits since
tag, and it would be nice to have number of commits since init...
but that can be easily obtained using "git rev-list $1 | wc -l".
I guess that some use git-describe with --abbrev=0 to get closest
preceding tag: getting INIT would confuse them.
That said, we could use e.g. INITg2a45ba+10-g4ee2ab
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2007-02-07 9:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-07 0:23 describe fails on tagless branch Han-Wen Nienhuys
2007-02-07 0:40 ` Jakub Narebski
2007-02-07 1:19 ` Han-Wen Nienhuys
2007-02-07 2:14 ` Junio C Hamano
2007-02-07 9:08 ` Jakub Narebski [this message]
2007-02-07 9:22 ` Andy Parkins
2007-02-07 9:58 ` Junio C Hamano
2007-02-07 12:01 ` Andy Parkins
2007-02-07 12:37 ` Jakub Narebski
2007-02-07 16:29 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='eqc4s4$nm9$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.