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

Re: [PATCH] cat-file: handle content request for --batch-command without type

From
ASAlan Stokes <alan@source.dev>
Date
Jul 29, 2026, 10:03 UTC
Message-ID
<CAFZW3h2hVMaVy12uO_5k5cwN=N9LDhrxuVSQPNmPWxB4j+kRwQ@mail.gmail.com>
In-Reply-To
<xmqqjyqfdnie.fsf@gitster.g>
On Tue, 28 Jul 2026 at 18:36, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
>
> Jeff King <peff@peff.net> writes:
>
> > We can fix it by tweaking the object_info on the fly as we receive each
> > command. But we should be careful to restore it afterwards; otherwise a
> > sequence of commands like:
> >
> >   contents $one
> >   info $two
> >   info $three
> >
> > will pay the type-lookup price for $two and $three when it does not need
> > to. This wouldn't be incorrect, but just slightly inefficient (and hence
> > there are no tests for that part, because the externally-visible
> > behavior is the same).
>
> Woooo, tricky.  I love this kind of attention to details.
>
> The patch text obviously is correct.
>
> Will queue and mark the topic for 'next'.  Thanks.
Thanks, Peff and Pablo. Sorry I wasn't able to contribute this time.

(Peff: for some reason I'm not receiving emails from you, although I've got the other ones on this thread. I'm assuming that's due to some over-zealous filter at my end.)

Best wishes,
Alan
Previous: Junio C HamanoNext: Jeff King
Message 7 of 8 in “Assertion failure with git cat-file --batch-command”
  1. Alan StokesJul 27, 2026
  2. Jeff KingJul 27, 2026
  3. Pablo SabaterJul 27, 2026
  4. Alan StokesJul 28, 2026
  5. cat-file: handle content request for --batch-command without typeJeff King, Jul 28, 2026
  6. Junio C HamanoJul 28, 2026
  7. Alan StokesJul 29, 2026
  8. Jeff KingJul 29, 2026

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.