From: Jeff King Date: Tue, 16 Jun 2026 11:15:34 GMT Subject: Re: [PATCH] cat-file: speed up default format Message-ID: <20260616111534.GB687438@coredump.intra.peff.net> In-Reply-To: On Mon, Jun 15, 2026 at 11:53:10PM +0200, René Scharfe wrote: > > } else if (is_atom("rest", atom, len)) { > > - if (data->mark_query) > > - data->split_on_whitespace = 1; > > - else if (data->rest) > > This removes support for rest being NULL, breaking t1006.381. Yup. I did say "only lightly tested". ;) The fix is obviously just: diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 9cc7ec7a6f..370ca6d771 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -363,7 +363,8 @@ static void objectsize_disk_add(struct format_item *item UNUSED, static void rest_add(struct format_item *item UNUSED, struct strbuf *sb, struct expand_data *data) { - strbuf_addstr(sb, data->rest); + if (data->rest) + strbuf_addstr(sb, data->rest); } static void deltabase_add(struct format_item *item UNUSED, I think perhaps this error shows that the mark_query thing in the existing code obfuscates the logic a bit. -Peff