format-patch: fix bug with --stdout in a subdirectory
We set the output directory to the git subdirectory prefix if one has not already been specified. However, in the case of --stdout, we explicitly _don't_ want the output directory to be set. The result was that "git-format-patch --stdout" in a directory besides the project root produced the "standard output, or directory, which one?" error message. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Jeff King committed
Jan 22, 2007 at 22:38 UTC
90f70a910ac77cab7bc1b9a6c4b233add98a58c7
1 file changed
+1
-1
builtin-log.c
+1
-1
@@ -476,7 +476,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
476
if (!rev.diffopt.text)
477
rev.diffopt.binary = 1;
478
479
- if (!output_directory)
479
+ if (!output_directory && !use_stdout)
480
output_directory = prefix;
481
482
if (output_directory) {