Skip to content

Commit

Permalink
git-format-patch: fix bug using -o in subdirectories
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthias Lederhofer authored and Junio C Hamano committed Sep 29, 2006
1 parent a283837 commit 77e565d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builtin-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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?");
Expand Down

0 comments on commit 77e565d

Please sign in to comment.