Thread (1 message) 1 message, 1 author, 2023-08-10

Re: [PATCH 2/2] rebase: allow overriding the maximal length of the generated labels

From: Junio C Hamano <hidden>
Date: 2023-08-10 17:15:34

"Johannes Schindelin via GitGitGadget" [off-list ref]
writes:
From: Johannes Schindelin <redacted>

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.
quoted hunk
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help