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

Re: [BUG] in rev-parse

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2011, 17:43 UTC
Message-ID
<7vvcphohn1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20111215070521.GB1327@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Dropping the implied verify is easy (see below). But handling
> non-existant sha1s is a much more complicated change, as the regular
> abbreviation machinery assumes that they exist.

Hmm, I was very sure that I wrote a logic to do the "no such object" case at least once, so I looked and found one in find_unique_abbrev(). But that requires the caller to feed the full 160-bit sha1[] and perhaps it is not easily used in the context of rev-parse (I didn't look further).

> Anyway, I'm not sure it's worth changing at this point. It's part of the
> plumbing API that has been that way forever,...
Ok.
Previous: Jeff KingNext: Michael Haggerty
Message 5 of 7 in “[BUG] in rev-parse”
  1. nathan.panike@gmail.comDec 14, 2011
  2. Jeff KingDec 14, 2011
  3. Junio C HamanoDec 15, 2011
  4. Jeff KingDec 15, 2011
  5. Junio C HamanoDec 15, 2011
  6. Michael HaggertyDec 15, 2011
  7. Jeff KingDec 17, 2011

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.