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

Re: [PATCH 1/2] factor out strbuf_expand_bad_format()

From
Chris Torek <chris.torek@gmail.com>
Date
Mar 24, 2024, 09:00 UTC
Message-ID
<CAPx1GveKUL1nexRQDYueAVU7G0vp+JzB=5yUf4r4eoRjU49Jcg@mail.gmail.com>
In-Reply-To
<27cdcde7-74bc-4ee8-bc84-9a6046292cae@web.de>
Minor:
On Sun, Mar 24, 2024 at 1:00 AM René Scharfe <l.s.r@web.de> wrote:
Show 7 quoted lines
> @@ -308,8 +301,7 @@ static void show_ce_fmt(struct repository *repo, const struct cache_entry *ce,
>                 else if (skip_prefix(format, "(path)", &format))
>                         write_name_to_buf(&sb, fullname);
>                 else
> -                       die(_("bad ls-files format: %%%.*s"),
> -                           (int)(end - format + 1), format);
> +                       strbuf_expand_bad_format(format, "ls-format");
This last string constant is clearly supposed to be "ls-files".
Chris
Previous: René ScharfeNext: René Scharfe
Message 3 of 7 in “factor out strbuf_expand_bad_format()”
  1. 1/2 factor out strbuf_expand_bad_format()René Scharfe, Mar 24, 2024
  2. 2/2 cat-file: use strbuf_expand_bad_format()René Scharfe, Mar 24, 2024
  3. Chris TorekMar 24, 2024
  4. René ScharfeMar 24, 2024
  5. 1/2 factor out strbuf_expand_bad_format()René Scharfe, Mar 24, 2024
  6. Junio C HamanoMar 24, 2024
  7. 2/2 cat-file: use strbuf_expand_bad_format()René Scharfe, Mar 24, 2024

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.