summaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-17 14:32:52 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-17 23:48:20 -0800
commite47f306d4bf964def1a0b29e8f7cea419471dffd (patch)
tree6ab4697911f1ee7051ac60f28d4bcbe46a37b884 /builtin-log.c
parentc261e4385e826a4e7f9cf69618fa0b6e39defad2 (diff)
downloadgit-e47f306d4bf964def1a0b29e8f7cea419471dffd.tar.gz
git-format-patch: make --binary on by default
It does not make much sense to generate a patch that cannot be applied. If --text is specified on the command line it still takes precedence. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin-log.c b/builtin-log.c
index c32a1df0bb..930cc0401c 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -470,6 +470,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_SUMMARY | DIFF_FORMAT_PATCH;
+ if (!rev.diffopt.text)
+ rev.diffopt.binary = 1;
+
if (!output_directory)
output_directory = prefix;