mirror of
https://github.com/git/git
synced 2024-08-25 10:45:59 +00:00
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>
This commit is contained in:
parent
a28383770e
commit
77e565d8f7
|
@ -270,8 +270,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||||
|
|
||||||
rev.extra_headers = extra_headers;
|
rev.extra_headers = extra_headers;
|
||||||
|
|
||||||
output_directory = prefix;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse the arguments before setup_revisions(), or something
|
* Parse the arguments before setup_revisions(), or something
|
||||||
* like "git fmt-patch -o a123 HEAD^.." may fail; a123 is
|
* 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)
|
if (!rev.diffopt.output_format)
|
||||||
rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH;
|
rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH;
|
||||||
|
|
||||||
|
if (!output_directory)
|
||||||
|
output_directory = prefix;
|
||||||
|
|
||||||
if (output_directory) {
|
if (output_directory) {
|
||||||
if (use_stdout)
|
if (use_stdout)
|
||||||
die("standard output, or directory, which one?");
|
die("standard output, or directory, which one?");
|
||||||
|
|
Loading…
Reference in a new issue