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

Re: What's cooking in git.git (Mar 2014, #02; Tue, 11)

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 12, 2014, 19:49 UTC
Message-ID
<xmqqa9cvkxib.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140312193509.GA1816@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 36 quoted lines
> On Tue, Mar 11, 2014 at 03:12:11PM -0700, Junio C Hamano wrote:
>
>> * jk/warn-on-object-refname-ambiguity (2014-01-09) 6 commits
>>  - get_sha1: drop object/refname ambiguity flag
>>  - get_sha1: speed up ambiguous 40-hex test
>>  - FIXUP: teach DO_FOR_EACH_NO_RECURSE to prime_ref_dir()
>>  - refs: teach for_each_ref a flag to avoid recursion
>>  - cat-file: fix a minor memory leak in batch_objects
>>  - cat-file: refactor error handling of batch_objects
>> 
>>  Expecting a reroll.
>
> I finally got a chance to return to this one. Michael had some good
> comments on the refactoring that was going on in the middle patches. He
> ended with:
>
>   Yes.  Still, the code is really piling up for this one warning for the
>   contrived eventuality that somebody wants to pass SHA-1s and branch
>   names together in a single cat-file invocation *and* wants to pass
>   lots of inputs at once and so is worried about performance *and* has
>   reference names that look like SHA-1s.  Otherwise we could just leave
>   the warning disabled in this case, as now.  Or we could add a new
>   "--hashes-only" option that tells cat-file to treat all of its
>   arguments/inputs as SHA-1s; such an option would permit an even faster
>   code path for bulk callers.
>
> Having looked at it again, I really think it is not worth pursuing. The
> end goal is not that interesting, there is a lot of code introduced, and
> a reasonable chance of accidentally introducing regressions and/or
> making the code less maintainable.  Keeping the existing code (which
> just disables the check for cat-file) is probably the sanest course of
> action. We can do a similar thing for "rev-list --stdin" if we want, or
> we can wait until somebody complains.
>
> The bottom two patches are reasonable cleanups we should keep, though
> (and the rest can just be discarded).
Fine, let's do that.
Thanks.
Previous: Jeff KingNext: Jeff King
Message 5 of 8 in “What's cooking in git.git (Mar 2014, #02; Tue, 11)”
  1. Junio C HamanoMar 11, 2014
  2. Duy NguyenMar 11, 2014
  3. Junio C HamanoMar 12, 2014
  4. Jeff KingMar 12, 2014
  5. Junio C HamanoMar 12, 2014
  6. Jeff KingMar 12, 2014
  7. 1/2 cat-file: restore warn_on_object_refname_ambiguity flagJeff King, Mar 12, 2014
  8. 2/2 rev-list: disable object/refname ambiguity check with --stdinJeff King, Mar 12, 2014

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.