summaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2007-01-22 22:38:28 -0500
committerJunio C Hamano <junkio@cox.net>2007-01-22 19:46:19 -0800
commit90f70a910ac77cab7bc1b9a6c4b233add98a58c7 (patch)
tree378b25150d5812b3588f1a5abb9e309b1d69cba6 /builtin-log.c
parent83e24dce148fd384cbfb01cf718ec32618f6d8b3 (diff)
downloadgit-90f70a910ac77cab7bc1b9a6c4b233add98a58c7.tar.gz
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>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 13a3f9b25d..503cd1e2be 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -476,7 +476,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (!rev.diffopt.text)
rev.diffopt.binary = 1;
- if (!output_directory)
+ if (!output_directory && !use_stdout)
output_directory = prefix;
if (output_directory) {