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

Re: git-describe hash length

From
Tomas Carnecky <tom@dbservice.com>
Date
Jan 22, 2009, 12:34 UTC
Message-ID
<497867BE.8070509@dbservice.com>
In-Reply-To
<497857CE.3060101@iaik.tugraz.at>
On 01/22/2009 12:26 PM, Martin Pirker wrote:
Show 22 quoted lines
> Hi!
>
>
> john@doe:/workspace$ git version
> git version 1.6.1
> john@doe:/workspace$ git describe
> fatal: cannot describe '7aee61cc635a923e70b74091486742481ee0928b'
> john@doe:/workspace$ git describe --always
> 7aee61c
> john@doe:/workspace$ git describe --always --abbrev=8
> 7aee61cc
>
>
> man git-describe:
>
>    --abbrev=<n>
>        Instead of using the default 8 hexadecimal digits as the
>        abbreviated object name, use<n>  digits.
>
>
>
> There is one character missing from default or what am I missing?
The man page is wrong:

cache.h:#define DEFAULT_ABBREV 7 builtin-describe.c:static int abbrev = DEFAULT_ABBREV;

tom
Previous: Martin PirkerNext: Boyd Stephen Smith Jr.
Message 2 of 4 in “git-describe hash length”
  1. Martin PirkerJan 22, 2009
  2. Tomas CarneckyJan 22, 2009
  3. Fix Documentation for git-describeBoyd Stephen Smith Jr., Jan 22, 2009
  4. Junio C HamanoJan 23, 2009

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.