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

Re: help with git usage

From
Julian Phillips <julian@quantumfyre.co.uk>
Date
May 8, 2008, 00:16 UTC
Message-ID
<Pine.LNX.4.64.0805080112580.6421@kaos.quantumfyre.co.uk>
In-Reply-To
<200805072242.m47Mg1o0015578@rs40.luxsci.com>
On Wed, 7 May 2008, Daniel Quinlan wrote:
Show 13 quoted lines
> I'm looking for a way to embed some identifying information about 
> version
> into compiled programs.  I hasten to add that I am not looking to 
> expand RCS-like
> tags.  Unlike CVS/RCS, git provides a single value that characterizes 
> the whole
> distribution, at least if everything is committed.  So, something like 
> "git log | head -1 | awk '{print $2}'"
> probably provides a value which I can embed into executables and 
> libraries, tying
> them to a particular source configuration.  I'm just curious if 
> there's a better approach
> to getting the commit hash.
something like "git show-ref -s HEAD" perhaps?
-- 
Julian

  ---
The Kennedy Constant:
 	Don't get mad -- get even.
Previous: Daniel QuinlanNext: Dirk Süsserott
Message 5 of 12 in “help with git usage”
  1. Daniel QuinlanApr 29, 2008
  2. Daniel BarkalowApr 29, 2008
  3. Jakub NarebskiApr 30, 2008
  4. Daniel QuinlanMay 7, 2008
  5. Julian PhillipsMay 8, 2008
  6. Dirk SüsserottMay 8, 2008
  7. Jakub NarebskiMay 8, 2008
  8. Matt GrahamApr 30, 2008
  9. Andreas EricssonApr 30, 2008
  10. Richard QuirkApr 30, 2008
  11. Jakub NarebskiApr 30, 2008
  12. Richard QuirkApr 30, 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.