public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Sitaram Chamarty <sitaramc@gmail•com>
Cc: "git\@vger.kernel.org" <git@vger•kernel.org>
Subject: Re: git name-rev not accepting abbreviated SHA with --stdin
Date: Fri, 03 Jul 2015 10:36:41 -0700	[thread overview]
Message-ID: <xmqqbnft5eja.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <558B60E4.9020604@gmail.com> (Sitaram Chamarty's message of "Thu, 25 Jun 2015 07:31:08 +0530")

Sitaram Chamarty <sitaramc@gmail•com> writes:

> 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.

  reply	other threads:[~2015-07-03 17:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24  3:29 git name-rev not accepting abbreviated SHA with --stdin Sitaram Chamarty
2015-06-25  0:11 ` Junio C Hamano
2015-06-25  2:01   ` Sitaram Chamarty
2015-07-03 17:36     ` Junio C Hamano [this message]
2015-07-04  1:26       ` Sitaram Chamarty
2015-07-04  2:03         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbnft5eja.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=sitaramc@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox