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

Re: [PATCH v2] doc: clarify that --abbrev=<n> is about the minimum length

From
Derrick Stolee <stolee@gmail.com>
Date
Nov 7, 2020, 15:09 UTC
Message-ID
<98710644-c060-c64e-8c0c-a27bfa0e58fb@gmail.com>
In-Reply-To
<xmqq8sbglr26.fsf_-_@gitster.c.googlers.com>
On 11/4/20 5:01 PM, Junio C Hamano wrote:
Show 16 quoted lines
> Early text written in 2006 explains the "--abbrev=<n>" option to
> "show only a partial prefix", without saying that the length of the
> partial prefix is not necessarily the number given to the option to
> ensure that the output names the object uniquely.
> 
> Update documentation for the diff family of commands, "blame",
> "branch --verbose", "ls-files" and "ls-tree" to stress that the
> short prefix must uniquely refer to an object, and <n> is merely
> the mininum number of hexdigits used in the prefix.
> 
> Helped-by: Derrick Stolee <dstolee@microsoft.com>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> 
>  * Thanks for your suggestion.  I decided to use "the shortest
>    prefix that is at least <n> hexdigits long".
I like this version. Thanks!
-Stolee
Previous: Junio C HamanoNext: Mário Guimarães
Message 6 of 7 in “Bug with --abbrev option in git log?”
  1. Mário GuimarãesNov 4, 2020
  2. Junio C HamanoNov 4, 2020
  3. doc: clarify that most --abbrev[=<n>] are about minimum lengthJunio C Hamano, Nov 4, 2020
  4. Derrick StoleeNov 4, 2020
  5. doc: clarify that --abbrev=<n> is about the minimum lengthJunio C Hamano, Nov 4, 2020
  6. Derrick StoleeNov 7, 2020
  7. Mário GuimarãesNov 4, 2020

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.