Re: [PATCH] Teach git-describe --long to output always the long format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> "Shawn O. Pearce" <spearce@xxxxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux