From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
"Santi Béjar" <sbejar@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] Teach git-describe --long to output always the long format
Date: Mon, 25 Feb 2008 00:50:06 -0800 (PST) [thread overview]
Message-ID: <m3oda5betk.fsf@localhost.localdomain> (raw)
In-Reply-To: <7vwsotpwbr.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
>
>>> + else
>>> + printf("%s-0-g%s\n", n->path,
>>> + find_unique_abbrev(cmit->object.sha1, abbrev));
>>
>> Is this really that useful? Where is having the tag and the commit
>> SHA-1 both useful?
>
> I had the same question. The only place that I find this could
> be useful is when you tag, build and install, and then find
> glitches before pushing the results out and rewind, rebuild and
> re-tag. I unfortunately have this issue almost all the time.
Another place where it is useful is parsing git-describe output, for
example in .spec file for RPM, if you want to avoid hardcoding the
information about the form of tags in a project (tags can, and
sometimes do, contain '-'). If you always use --long form, it is easy
to separate number of commits from tag and shortened sha1 from the tag
itself, for example to put closest tag as version number, and make
number of commits and perhaps also shortened sha1 into release number.
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2008-02-25 8:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-24 14:46 [PATCH] Teach git-describe --long to output always the long format Santi Béjar
2008-02-25 2:36 ` Shawn O. Pearce
2008-02-25 3:08 ` Junio C Hamano
2008-02-25 8:34 ` Santi Béjar
2008-02-25 8:54 ` Junio C Hamano
2008-02-25 9:05 ` Santi Béjar
2008-02-25 20:11 ` Junio C Hamano
2008-02-25 20:51 ` Santi Béjar
2008-02-26 9:19 ` Junio C Hamano
2008-02-26 9:41 ` Santi Béjar
2008-02-25 8:50 ` Jakub Narebski [this message]
2008-02-25 9:43 ` Santi Béjar
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=m3oda5betk.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sbejar@gmail.com \
--cc=spearce@spearce.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 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).