{"thread":{"id":"20134","subject":"git-describe: what is the '-g' prefix good for?","startedAt":"2009-07-16T16:20:16Z","lastAt":"2009-07-16T17:47:19Z","messageCount":2,"participants":["Dirk Süsserott","Avery Pennarun"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"118117","messageId":"4A5F5340.9030908@dirk.my1.cc","threadId":"20134","inReplyTo":null,"subject":"git-describe: what is the '-g' prefix good for?","fromName":"Dirk Süsserott","fromEmail":"newsletter@dirk.my1.cc","sentAt":"2009-07-16T16:20:16Z","receivedAt":"2009-07-16T16:20:16Z","isPatch":false,"sender":{"key":"newsletter@dirk.my1.cc","avatar":null},"body":"Hello there,\n\nI'm a bit surprised about the output of git-describe: if I'm on a tag,\ngit-describe tells the tag's name. Fine. If I commit sth. on top of\nthat, it tells how far I'm away from that tag and the current commit's\nSHA1. Very fine. But then the SHA1 is preceeded with a '-g'. What's that\nfor?\n\nI really don't want to ask for dropping it (I guess all people rely\non it), but does anybody know about the initial intention of that '-g'?\nCannot be easier parsing in porcelain scripts because either way the\nactual state is unambiguously.\n\nJust a curious\n     Dirk\n"},{"id":"118123","messageId":"32541b130907161047h7df7fa4dsfa61ed65789f4c01@mail.gmail.com","threadId":"20134","inReplyTo":"4A5F5340.9030908@dirk.my1.cc","subject":"Re: git-describe: what is the '-g' prefix good for?","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2009-07-16T17:47:19Z","receivedAt":"2009-07-16T17:47:19Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"2009/7/16 Dirk Süsserott <newsletter@dirk.my1.cc>:\n> I'm a bit surprised about the output of git-describe: if I'm on a tag,\n> git-describe tells the tag's name. Fine. If I commit sth. on top of\n> that, it tells how far I'm away from that tag and the current commit's\n> SHA1. Very fine. But then the SHA1 is preceeded with a '-g'. What's that\n> for?\n\nI'm sure it stands for something like \"git\".  You don't want a random\nnumber appended to your tagname (which is often a version number)\nbecause it might be mistaken for part of the version number.  The g\nmakes this less likely.  It also differentiates between git and any\nother version control system (except ones starting with 'g', I guess\n:)) that might implement a similar feature.\n\nAvery\n"}]}