Re: git-describe: what is the '-g' prefix good for?
- From
Avery Pennarun <apenwarr@gmail.com>
- Date
- Jul 16, 2009, 17:47 UTC
- Message-ID
- <32541b130907161047h7df7fa4dsfa61ed65789f4c01@mail.gmail.com>
- In-Reply-To
- <4A5F5340.9030908@dirk.my1.cc>
2009/7/16 Dirk Süsserott <newsletter@dirk.my1.cc>:
Show 5 quoted lines
> I'm a bit surprised about the output of git-describe: if I'm on a tag, > git-describe tells the tag's name. Fine. If I commit sth. on top of > that, it tells how far I'm away from that tag and the current commit's > SHA1. Very fine. But then the SHA1 is preceeded with a '-g'. What's that > for?
I'm sure it stands for something like "git". You don't want a random number appended to your tagname (which is often a version number) because it might be mistaken for part of the version number. The g makes this less likely. It also differentiates between git and any other version control system (except ones starting with 'g', I guess :)) that might implement a similar feature.
Avery