summaryrefslogtreecommitdiff
path: root/Documentation/config
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-06 21:56:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-10 01:44:41 (GMT)
commit3baf58bfb4bcfe201970abeffa8e1396d2324250 (patch)
tree2ea7148e16c6689322c0ec404e16d21a136d2439 /Documentation/config
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
downloadgit-3baf58bfb4bcfe201970abeffa8e1396d2324250.zip
git-3baf58bfb4bcfe201970abeffa8e1396d2324250.tar.gz
git-3baf58bfb4bcfe201970abeffa8e1396d2324250.tar.bz2
format-patch: make output filename configurable
For the past 15 years, we've used the hardcoded 64 as the length limit of the filename of the output from the "git format-patch" command. Since the value is shorter than the 80-column terminal, it could grow without line wrapping a bit. At the same time, since the value is longer than half of the 80-column terminal, we could fit two or more of them in "ls" output on such a terminal if we allowed to lower it. Introduce a new command line option --filename-max-length=<n> and a new configuration variable format.filenameMaxLength to override the hardcoded default. While we are at it, remove a check that the name of output directory does not exceed PATH_MAX---this check is pointless in that by the time control reaches the function, the caller would already have done an equivalent of "mkdir -p", so if the system does not like an overly long directory name, the control wouldn't have reached here, and otherwise, we know that the system allowed the output directory to exist. In the worst case, we will get an error when we try to open the output file and handle the error correctly anyway. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config')
-rw-r--r--Documentation/config/format.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/config/format.txt b/Documentation/config/format.txt
index c2efd87..7f6d11b 100644
--- a/Documentation/config/format.txt
+++ b/Documentation/config/format.txt
@@ -94,6 +94,11 @@ format.outputDirectory::
Set a custom directory to store the resulting files instead of the
current working directory. All directory components will be created.
+format.filenameMaxLength::
+ The maximum length of the output filenames generated by the
+ `format-patch` command; defaults to 64. Can be overridden
+ by the `--filename-max-length=<n>` command line option.
+
format.useAutoBase::
A boolean value which lets you enable the `--base=auto` option of
format-patch by default. Can also be set to "whenAble" to allow