From: Matthias Lederhofer <matled@gmx.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] git-format-patch: fix bug using -o in subdirectories
Date: Thu, 28 Sep 2006 21:55:35 +0200 [thread overview]
Message-ID: <20060928195535.GA25262@moooo.ath.cx> (raw)
In-Reply-To: <7vzmckufu0.fsf@assigned-by-dhcp.cox.net>
This was introduced by me in commit v1.4.2.1-gc08e524.
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
---
Junio C Hamano <junkio@cox.net> wrote:
> "Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:
>
> > This patch works great. I assume you forgot it?
>
> Thanks for reminding.
Argh, there is a bug. When prefix is not NULL and -o is specified
git-format-patch fails:
~/src/git/a% ../git-format-patch -o ./b HEAD~1
fatal: Two output directories?
---
builtin-log.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin-log.c b/builtin-log.c
index 130b53a..9d1ceae 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -270,8 +270,6 @@ int cmd_format_patch(int argc, const cha
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 cha
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?");
--
1.4.2.1.ge767
next prev parent reply other threads:[~2006-09-28 19:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-22 9:21 git commands that only work correctly at top directory Nguyen Thai Ngoc Duy
2006-09-22 11:12 ` [PATCH] format-patch: use cwd as default output directory Matthias Lederhofer
2006-09-28 10:25 ` Nguyen Thai Ngoc Duy
2006-09-28 16:16 ` Junio C Hamano
2006-09-28 19:55 ` Matthias Lederhofer [this message]
2006-09-22 11:26 ` git commands that only work correctly at top directory Matthias Lederhofer
2006-09-22 12:57 ` Nguyen Thai Ngoc Duy
2006-09-23 15:16 ` Petr Baudis
2006-09-22 15:10 ` [PATCH] git-repack: allow git-repack to run in subdirectory Jeff King
2006-09-22 17:08 ` git commands that only work correctly at top directory Thomas Kolejka
2006-09-25 2:31 ` [PATCH/RESEND] git-repack: allow git-repack to run in subdirectory Jeff King
2006-09-25 3:16 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060928195535.GA25262@moooo.ath.cx \
--to=matled@gmx.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).