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

Re: [PATCH 1/2] Update :/abc ambiguity check

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2013, 04:10 UTC
Message-ID
<7vlibldfhx.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACsJy8B1uxbJvP+0ZEx3br9_Qr9ZX7num8bcgd5sFS7XnvGNpw@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 12 quoted lines
>>> ... 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.

Previous: Duy Nguyen
Message 5 of 5 in “Update :/abc ambiguity check”
  1. 1/2 Update :/abc ambiguity checkNguyễn Thái Ngọc Duy, Jan 21, 2013
  2. 2/2 grep: avoid accepting ambiguous revisionNguyễn Thái Ngọc Duy, Jan 21, 2013
  3. Junio C HamanoJan 21, 2013
  4. Duy NguyenJan 22, 2013
  5. Junio C HamanoJan 22, 2013

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.