git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [new tool] git-project-version.sh

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Apr 15, 2008, 11:55 UTC
Message-ID
<20080415115529.GA3595@atjola.homenet>
In-Reply-To
<20080415113629.GA17459@denkbrett.schottelius.org>
On 2008.04.15 13:36:29 +0200, Nico -telmich- Schottelius wrote:
Show 12 quoted lines
> Hello!
> 
> As I want to use the latest commit id in all my projects, so I know
> which commit the version is based on, I wrote an extremly simple script
> that is based on git-show to display only the version named
> git-project-version.sh.
> 
> You can find it in
>    http://unix.schottelius.org/git/git-tools.git/.git/
>    http://unix.schottelius.org/cgi-bin/gitweb.cgi?p=git-tools.git/.git;a=summary
> and more information is available on
>    http://nico.schottelius.org/notizbuch-blog/archive/2008/04/15/git-project-version-sh-written-versions-with-git/

Hm, except for the three trailing dots that you get with --abbrev-commit, you can get the same results with rev-parse

$ git rev-parse HEAD 8a18e8fe4e0e64222de6b063a976d0fe24955ddb

$ git rev-parse --short HEAD 8a18e8f

Björn
Previous: Nico -telmich- SchotteliusNext: Nico -telmich- Schottelius
Message 2 of 8 in “[new tool] git-project-version.sh”
  1. Nico -telmich- SchotteliusApr 15, 2008
  2. Björn SteinbrinkApr 15, 2008
  3. Nico -telmich- SchotteliusApr 15, 2008
  4. Santi BéjarApr 15, 2008
  5. Luciano RochaApr 15, 2008
  6. Nico SchotteliusApr 15, 2008
  7. Elijah NewrenApr 15, 2008
  8. Nico SchotteliusApr 15, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.