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

Re: git name-rev not accepting abbreviated SHA with --stdin

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 3, 2015, 17:36 UTC
Message-ID
<xmqqbnft5eja.fsf@gitster.dls.corp.google.com>
In-Reply-To
<558B60E4.9020604@gmail.com>
Sitaram Chamarty <sitaramc@gmail.com> writes:
Show 12 quoted lines
> On 06/25/2015 05:41 AM, Junio C Hamano wrote:
>> Sitaram Chamarty <sitaramc@gmail.com> writes:
>> 
>>> This *is* documented, but I'm curious why this distinction is made.
>> 
>> I think it is from mere laziness, and also in a smaller degree
>> coming from an expectation that --stdin would be fed by another
>> script like rev-list where feeding full 40-hex is less work than
>> feeding unique abbreviated prefix.
>
> Makes sense; thanks.  Maybe if I feel really adventurous I will,
> one day, look at the code :-)

Sorry, but I suspect this is not 100% laziness; it is meant to read text that has object names sprinkled in and output text with object names substituted. I suspect that this was done to prevent a short string that may look like an object name like deadbabe from getting converted into an unrelated commit object name.

Previous: Sitaram ChamartyNext: Sitaram Chamarty
Message 4 of 6 in “git name-rev not accepting abbreviated SHA with --stdin”
  1. Sitaram ChamartyJun 24, 2015
  2. Junio C HamanoJun 25, 2015
  3. Sitaram ChamartyJun 25, 2015
  4. Junio C HamanoJul 3, 2015
  5. Sitaram ChamartyJul 4, 2015
  6. Junio C HamanoJul 4, 2015

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.