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

Re: git-push: forced update of tag shows unabbreviated SHA1

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 31, 2008, 10:21 UTC
Message-ID
<7vodb2cn2a.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080131100625.GB25546@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
> ... then for every 12345678* that we don't have, we will claim
> the correct abbreviation is 1234568.
>
> In practice, I doubt this is a problem.
>
> But getting back to your point: yes, I agree it is a little ugly.
> Rewriting find_unique_abbrev would be necessary for fixing it, and I'm
> not sure it is worth the trouble.

I think that needs to be done carefully. I recall some callers do expect it to return NULL for nonexistant objects, so the bug you noted above as "rare case" may need to be fixed, which I think is more important than coming up with a potentially too short abbreviation.

Previous: Jeff KingNext: Jeff King
Message 5 of 9 in “git-push: forced update of tag shows unabbreviated SHA1”
  1. Johannes SixtJan 31, 2008
  2. Junio C HamanoJan 31, 2008
  3. Johannes SixtJan 31, 2008
  4. Jeff KingJan 31, 2008
  5. Junio C HamanoJan 31, 2008
  6. Jeff KingJan 31, 2008
  7. Jeff KingJan 31, 2008
  8. Junio C HamanoJan 31, 2008
  9. Jeff KingJan 31, 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.