{"thread":{"id":"13122","subject":"[new tool] git-project-version.sh","startedAt":"2008-04-15T11:36:29Z","lastAt":"2008-04-15T13:09:22Z","messageCount":8,"participants":["Nico -telmich- Schottelius","Björn Steinbrink","Santi Béjar","Luciano Rocha","Nico Schottelius","Elijah Newren"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"74434","messageId":"20080415113629.GA17459@denkbrett.schottelius.org","threadId":"13122","inReplyTo":null,"subject":"[new tool] git-project-version.sh","fromName":"Nico -telmich- Schottelius","fromEmail":"nico-git-20080415@schottelius.org","sentAt":"2008-04-15T11:36:29Z","receivedAt":"2008-04-15T11:36:29Z","isPatch":false,"sender":{"key":"nico-git-20080415@schottelius.org","avatar":null},"body":"Hello!\n\nAs I want to use the latest commit id in all my projects, so I know\nwhich commit the version is based on, I wrote an extremly simple script\nthat is based on git-show to display only the version named\ngit-project-version.sh.\n\nYou can find it in\n   http://unix.schottelius.org/git/git-tools.git/.git/\n   http://unix.schottelius.org/cgi-bin/gitweb.cgi?p=git-tools.git/.git;a=summary\nand more information is available on\n   http://nico.schottelius.org/notizbuch-blog/archive/2008/04/15/git-project-version-sh-written-versions-with-git/\n\nSincerly\n\nNico\n\nps: please cc on reply, I am not subscribed.\n\n-- \nThink about Free and Open Source Software (FOSS).\nhttp://nico.schottelius.org/documentations/foss/the-term-foss/\n\nPGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C\n"},{"id":"74436","messageId":"20080415115529.GA3595@atjola.homenet","threadId":"13122","inReplyTo":"20080415113629.GA17459@denkbrett.schottelius.org","subject":"Re: [new tool] git-project-version.sh","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2008-04-15T11:55:29Z","receivedAt":"2008-04-15T11:55:29Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2008.04.15 13:36:29 +0200, Nico -telmich- Schottelius wrote:\n> Hello!\n> \n> As I want to use the latest commit id in all my projects, so I know\n> which commit the version is based on, I wrote an extremly simple script\n> that is based on git-show to display only the version named\n> git-project-version.sh.\n> \n> You can find it in\n>    http://unix.schottelius.org/git/git-tools.git/.git/\n>    http://unix.schottelius.org/cgi-bin/gitweb.cgi?p=git-tools.git/.git;a=summary\n> and more information is available on\n>    http://nico.schottelius.org/notizbuch-blog/archive/2008/04/15/git-project-version-sh-written-versions-with-git/\n\nHm, except for the three trailing dots that you get with\n--abbrev-commit, you can get the same results with rev-parse\n\n$ git rev-parse  HEAD\n8a18e8fe4e0e64222de6b063a976d0fe24955ddb\n\n$ git rev-parse --short HEAD\n8a18e8f\n\nBjörn\n"},{"id":"74440","messageId":"8aa486160804150501p2f55a3e9g33df94c1d4274e48@mail.gmail.com","threadId":"13122","inReplyTo":"20080415113629.GA17459@denkbrett.schottelius.org","subject":"Re: [new tool] git-project-version.sh","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2008-04-15T12:01:06Z","receivedAt":"2008-04-15T12:01:06Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On Tue, Apr 15, 2008 at 1:36 PM, Nico -telmich- Schottelius\n<nico-git-20080415@schottelius.org> wrote:\n> Hello!\n>\n>  As I want to use the latest commit id in all my projects, so I know\n>  which commit the version is based on, I wrote an extremly simple script\n>  that is based on git-show to display only the version named\n>  git-project-version.sh.\n\nan equivalent simpler version is:\n\ngit rev-parse [--short] HEAD\n\nAlso \"git show\" is a porcelain command, that means it is for humans,\nnot for scripts. The output of \"git show\" can change while the output\nof \"git rev-parse\" (and the plumbing) is stable.\n\nBut maybe what you really want is:\n\ngit describe [--always]\n\nSanti\n"},{"id":"74439","messageId":"20080415120212.GB17459@denkbrett.schottelius.org","threadId":"13122","inReplyTo":"20080415115529.GA3595@atjola.homenet","subject":"Re: [new tool] git-project-version.sh","fromName":"Nico -telmich- Schottelius","fromEmail":"nico-git-20080415@schottelius.org","sentAt":"2008-04-15T12:02:12Z","receivedAt":"2008-04-15T12:02:12Z","isPatch":false,"sender":{"key":"nico-git-20080415@schottelius.org","avatar":null},"body":"Björn Steinbrink [Tue, Apr 15, 2008 at 01:55:29PM +0200]:\n> > [...git-project-version.sh...]\n> > \n> \n> Hm, except for the three trailing dots that you get with\n> --abbrev-commit, you can get the same results with rev-parse\n> \n> $ git rev-parse  HEAD\n> 8a18e8fe4e0e64222de6b063a976d0fe24955ddb\n> \n> $ git rev-parse --short HEAD\n> 8a18e8f\n\nShould have known that before... thank you for the hint!\n\nSo just forget my previous post :-)\n\nNico\n\n-- \nThink about Free and Open Source Software (FOSS).\nhttp://nico.schottelius.org/documentations/foss/the-term-foss/\n\nPGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C\n"},{"id":"74441","messageId":"20080415120507.GB21572@bit.office.eurotux.com","threadId":"13122","inReplyTo":"20080415113629.GA17459@denkbrett.schottelius.org","subject":"Re: [new tool] git-project-version.sh","fromName":"Luciano Rocha","fromEmail":"luciano@eurotux.com","sentAt":"2008-04-15T12:05:07Z","receivedAt":"2008-04-15T12:05:07Z","isPatch":false,"sender":{"key":"luciano@eurotux.com","avatar":null},"body":"On Tue, Apr 15, 2008 at 01:36:29PM +0200, Nico -telmich- Schottelius wrote:\n> Hello!\n> \n> As I want to use the latest commit id in all my projects, so I know\n> which commit the version is based on, I wrote an extremly simple script\n> that is based on git-show to display only the version named\n> git-project-version.sh.\n> \n> You can find it in\n>    http://unix.schottelius.org/git/git-tools.git/.git/\n\nI couldn't clone:\nCannot get remote repository information.\nPerhaps git-update-server-info needs to be run there?\n\n>    http://unix.schottelius.org/cgi-bin/gitweb.cgi?p=git-tools.git/.git;a=summary\n> and more information is available on\n>    http://nico.schottelius.org/notizbuch-blog/archive/2008/04/15/git-project-version-sh-written-versions-with-git/\n\nI use \"git describe\" for this, it's more user-friendly.\n\n-- \nLuciano Rocha <luciano@eurotux.com>\nEurotux Informática, S.A. <http://www.eurotux.com/>\n"},{"id":"74443","messageId":"20080415125209.GC17459@denkbrett.schottelius.org","threadId":"13122","inReplyTo":"20080415120507.GB21572@bit.office.eurotux.com","subject":"Re: [new tool] git-project-version.sh","fromName":"Nico Schottelius","fromEmail":"nico-git-20080415@schottelius.org","sentAt":"2008-04-15T12:52:09Z","receivedAt":"2008-04-15T12:52:09Z","isPatch":false,"sender":{"key":"nico-git-20080415@schottelius.org","avatar":null},"body":"Santi Béjar [Tue, Apr 15, 2008 at 02:01:06PM +0200]:\nLuciano Rocha [Tue, Apr 15, 2008 at 01:05:07PM +0100]:\n> [...git describe...]\n\nLooks also quite nice, also added it to the blog entry,\nbut it seems to work wrong here:\n\nThe last tag I created on the master branch is called 1.20.3pre6,\nbut git-describe uses pre5:\n\n[14:39] denkbrett:gpm% git-describe \n1.20.3pre5-17-gfccc331\n[14:43] denkbrett:gpm% git tag \n1.20.3pre1\n1.20.3pre2\n1.20.3pre3\n1.20.3pre4\n1.20.3pre5\n1.20.3pre6\n1.99.0\n1.99.1\n1.99.2\n1.99.2.1\n1.99.2.2\n1.99.3\n1.99.4\n1.99.5\n[14:44] denkbrett:gpm% git branch  \n  gpm-1-stable\n  gpm-2-dev\n* master\n[14:51] denkbrett:gpm% git --version\ngit version 1.5.4.4\n\n\nNico\n\n-- \nThink about Free and Open Source Software (FOSS).\nhttp://nico.schottelius.org/documentations/foss/the-term-foss/\n\nPGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C\n"},{"id":"74444","messageId":"51419b2c0804150555i50bcfa98pb6811c14e33f9d3c@mail.gmail.com","threadId":"13122","inReplyTo":"20080415125209.GC17459@denkbrett.schottelius.org","subject":"Re: [new tool] git-project-version.sh","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2008-04-15T12:55:18Z","receivedAt":"2008-04-15T12:55:18Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Tue, Apr 15, 2008 at 6:52 AM, Nico Schottelius\n<nico-git-20080415@schottelius.org> wrote:\n> Santi Béjar [Tue, Apr 15, 2008 at 02:01:06PM +0200]:\n>  Luciano Rocha [Tue, Apr 15, 2008 at 01:05:07PM +0100]:\n>  > [...git describe...]\n>\n>  Looks also quite nice, also added it to the blog entry,\n>  but it seems to work wrong here:\n>\n>  The last tag I created on the master branch is called 1.20.3pre6,\n>  but git-describe uses pre5:\n\nIs your 1.20.3pre6 tag annotated?  git-describe only uses annotated\ntags by default; pass the --tags option to have it consider all tags.\n(This caught me be surprise a few times as well.)\n\nElijah\n"},{"id":"74445","messageId":"20080415130922.GD17459@denkbrett.schottelius.org","threadId":"13122","inReplyTo":"51419b2c0804150555i50bcfa98pb6811c14e33f9d3c@mail.gmail.com","subject":"Re: [new tool] git-project-version.sh","fromName":"Nico Schottelius","fromEmail":"nico-git-20080415@schottelius.org","sentAt":"2008-04-15T13:09:22Z","receivedAt":"2008-04-15T13:09:22Z","isPatch":false,"sender":{"key":"nico-git-20080415@schottelius.org","avatar":null},"body":"Elijah Newren [Tue, Apr 15, 2008 at 06:55:18AM -0600]:\n> [...Is your 1.20.3pre6 tag annotated?...]\n\nGot me, it is not!\n\nAlso added your hint, thank you!\n\nNico\n\n-- \nThink about Free and Open Source Software (FOSS).\nhttp://nico.schottelius.org/documentations/foss/the-term-foss/\n\nPGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C\n"}]}