Re: current repository hash

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

 



On Mon, Jun 16, 2008 at 01:51:52PM +0200, Alf Clement wrote:

> What would be the best command to get a unique identifier?

If you just want the commit sha1, then "git rev-list -1 HEAD" will give
it to you. But take a look at git-describe, which is designed to give a
nice human-readable name based on your tags.

> Do I need the 40 digit hash id?

No, but you increase your chances of a collision in the future. In
practice, 8 or 9 characters tends to give unique commits.

> How can I make sure that a shorter hash id will be unique?

git-describe will find the shortest unique hash. But bear in mind that
it may not be unique forever.

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