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

Re: [PATCH] format-patch: make output filename configurable

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Nov 6, 2020, 22:05 UTC
Message-ID
<CAPig+cQAreDJn_tS_K4sR9HwsSVNoFid9sWSdxzwSqkJLRidgQ@mail.gmail.com>
In-Reply-To
<xmqqo8kadu9j.fsf_-_@gitster.c.googlers.com>
On Fri, Nov 6, 2020 at 4:56 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> [...]
> Introduce a new command line option --filename-max-length=<n> and a
> new configuration variable format.filenameMaxLength to override the
> hardcoded default.
> [...]
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
> @@ -200,6 +201,13 @@ populated with placeholder text.
> +--filename-max-length=<n>::
> +       Instead of the standard 64 bytes, chomp the generated output
> +       filenames at around '<n>' bytes (too short a value will be
> +       silently raised to a reasonable length).  Defaults to the
> +       value of the `format.filenamemaxlength` configuration
> +       variable, or 64 if unconfigured.

In user-facing documentation, I believe practice is to camelCase the configuration variable name, so: s/filenamemaxlength/filenameMaxLength/

This new configuration also ought to be mentioned in Documentation/config/format.txt.

> diff --git a/builtin/log.c b/builtin/log.c
> @@ -37,6 +37,7 @@
> +#define FORMAT_PATCH_NAME_MAX 64
Nit: A slightly less confusing name would be FORMAT_PATCH_NAME_MAX_DEFAULT.
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 15 in “Lengthening FORMAT_PATCH_NAME_MAX to 80”
  1. Lengthening FORMAT_PATCH_NAME_MAX to 80Hu Keping, Nov 5, 2020
  2. Jeff KingNov 5, 2020
  3. Junio C HamanoNov 5, 2020
  4. hukepingNov 6, 2020
  5. Junio C HamanoNov 6, 2020
  6. Junio C HamanoNov 6, 2020
  7. format-patch: make output filename configurableJunio C Hamano, Nov 6, 2020
  8. Eric SunshineNov 6, 2020
  9. format-patch: make output filename configurableJunio C Hamano, Nov 9, 2020
  10. Jeff KingNov 10, 2020
  11. Junio C HamanoNov 10, 2020
  12. hukepingNov 10, 2020
  13. Junio C HamanoNov 10, 2020
  14. hukepingNov 10, 2020
  15. Junio C HamanoNov 10, 2020

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.