Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-18 01:32:52 +0300
committerJunio C Hamano <junkio@cox.net>2007-01-18 10:48:20 +0300
commite47f306d4bf964def1a0b29e8f7cea419471dffd (patch)
tree6ab4697911f1ee7051ac60f28d4bcbe46a37b884 /builtin-log.c
parentc261e4385e826a4e7f9cf69618fa0b6e39defad2 (diff)
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;