diff options
author | Matthias Lederhofer <matled@gmx.net> | 2006-09-28 21:55:35 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-28 18:26:09 -0700 |
commit | 77e565d8f76357781eb6236e031e8e0581de83a9 (patch) | |
tree | 468c276b77a1086ea030b3b3aa089919a869e8d8 /builtin-log.c | |
parent | a28383770ec44357bfce4af834dc09bf14d9410e (diff) | |
download | git-77e565d8f76357781eb6236e031e8e0581de83a9.tar.gz |
git-format-patch: fix bug using -o in subdirectories
This was introduced by me in commit v1.4.2.1-gc08e524.
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-log.c')
-rw-r--r-- | builtin-log.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-log.c b/builtin-log.c index 130b53a196..9d1ceae44c 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -270,8 +270,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) rev.extra_headers = extra_headers; - output_directory = prefix; - /* * Parse the arguments before setup_revisions(), or something * like "git fmt-patch -o a123 HEAD^.." may fail; a123 is @@ -350,6 +348,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) if (!rev.diffopt.output_format) rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH; + if (!output_directory) + output_directory = prefix; + if (output_directory) { if (use_stdout) die("standard output, or directory, which one?"); |