Re: [PATCH 2/2] rebase: allow overriding the maximal length of the generated labels
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 10, 2023, 17:15 UTC
- Message-ID
- <xmqqil9mstse.fsf@gitster.g>
- In-Reply-To
- <fa757ac107d58a607a2faabd3e70934ee22d1b51.1691685300.git.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 11 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > With this change, users can override the compiled-in default for the > maximal length of the label names generated by `git rebase > --rebase-merges`. > ... > +rebase.maxLabelLength:: > + When generating label names from commit subjects, truncate the names to > + this length. By default, the names are truncated to a little less than > + `NAME_MAX` (to allow e.g. `.lock` files to be written for the > + corresponding loose refs).
OK.
Show 6 quoted lines
> @@ -5512,6 +5514,8 @@ static int make_script_with_merges(struct pretty_print_context *pp,
> *cmd_reset = abbr ? "t" : "reset",
> *cmd_merge = abbr ? "m" : "merge";
>
> + git_config_get_int("rebase.maxlabellength", &state.max_label_length);
> +And it makes sense that the code does not do any check against the NAME_MAX; presumably the primary mission of this configuration variable is to help users who know better than their system headers, and they may need to bust the NAME_MAX limit that is artificially set too low.
Will queue. Thanks.