path: root/Documentation/git-format-patch.txt
diff options
authorAlexander Kuleshov <>2016-01-13 13:20:11 (GMT)
committerJunio C Hamano <>2016-01-13 18:55:01 (GMT)
commitbc6bf2d7641d6c2450b347d5a0b2f954728bf4d9 (patch)
tree97dbe8488517a2ecb46853795ccc242982abc05e /Documentation/git-format-patch.txt
parent754884255bb580df159e58defa81cdd30b5c430c (diff)
format-patch: introduce format.outputDirectory configuration
We can pass -o/--output-directory to the format-patch command to store patches in some place other than the working directory. This patch introduces format.outputDirectory configuration option for same purpose. The case of usage of this configuration option can be convenience to not pass every time -o/--output-directory if an user has pattern to store all patches in the /patches directory for example. The format.outputDirectory has lower priority than command line option, so if user will set format.outputDirectory and pass the command line option, a result will be stored in a directory that passed to command line option. Signed-off-by: Alexander Kuleshov <> Signed-off-by: Stephen P. Smith <> Reviewed-by: Eric Sunshine <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-format-patch.txt')
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index e3cdaeb..64c2803 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -57,7 +57,11 @@ The names of the output files are printed to standard
output, unless the `--stdout` option is specified.
If `-o` is specified, output files are created in <dir>. Otherwise
-they are created in the current working directory.
+they are created in the current working directory. The default path
+can be set with the 'format.outputDirectory' configuration option.
+The `-o` option takes precedence over `format.outputDirectory`.
+To store patches in the current working directory even when
+`format.outputDirectory` points elsewhere, use `-o .`.
By default, the subject of a single patch is "[PATCH] " followed by
the concatenation of lines from the commit message up to the first blank