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

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.
Previous: Johannes Schindelin via GitGitGadgetNext: Mark Ruvald Pedersen via GitGitGadget
Message 3 of 7 in “sequencer: truncate lockfile and ref to NAME_MAX”
  1. 0/2 sequencer: truncate lockfile and ref to NAME_MAXMark Ruvald Pedersen via GitGitGadget, Aug 10, 2023
  2. 2/2 rebase: allow overriding the maximal length of the generated labelsJohannes Schindelin via GitGitGadget, Aug 10, 2023
  3. Junio C HamanoAug 10, 2023
  4. 1/2 sequencer: truncate labels to accommodate loose refsMark Ruvald Pedersen via GitGitGadget, Aug 10, 2023
  5. Junio C HamanoAug 10, 2023
  6. Johannes SchindelinAug 16, 2023
  7. Junio C HamanoAug 16, 2023

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.