public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Duy Nguyen <pclouds@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 1/2] Update :/abc ambiguity check
Date: Mon, 21 Jan 2013 20:10:50 -0800	[thread overview]
Message-ID: <7vlibldfhx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CACsJy8B1uxbJvP+0ZEx3br9_Qr9ZX7num8bcgd5sFS7XnvGNpw@mail.gmail.com> (Duy Nguyen's message of "Tue, 22 Jan 2013 09:46:13 +0700")

Duy Nguyen <pclouds@gmail•com> writes:

>>> ... take ":/abc" as rev even it's ambiguous. This patch makes it:
>>>
>>> - ambiguous when "abc" exists on worktree
>>> - a rev if abc does not exist on worktree
>>> - a path if abc is not found in any commits (although better use
>>
>> The "any commits" above sounds very scary. Are you really going to
>> check against all the commits?
>
> If I remember correctly :/ will search through commit chains until it
> finds a commit that matches. So :/non-existent-string definitely
> searches through all commits.

That is the real work the user asked us to do, so it is not a wasted
latency.  The description looked as if you were doing extra work
only for disambiguation, which triggered my "Huh?" meter.

      reply	other threads:[~2013-01-22  4:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 13:00 [PATCH 1/2] Update :/abc ambiguity check Nguyễn Thái Ngọc Duy
2013-01-21 13:00 ` [PATCH 2/2] grep: avoid accepting ambiguous revision Nguyễn Thái Ngọc Duy
2013-01-21 19:27 ` [PATCH 1/2] Update :/abc ambiguity check Junio C Hamano
2013-01-22  2:46   ` Duy Nguyen
2013-01-22  4:10     ` Junio C Hamano [this message]

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=7vlibldfhx.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=pclouds@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