Re: describe fails on tagless branch

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

 



Han-Wen Nienhuys <hanwen@xxxxxxxxx> 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 ||.


-
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]