]> asedeno.scripts.mit.edu Git - git.git/commitdiff
git-format-patch: make --binary on by default
authorJunio C Hamano <junkio@cox.net>
Wed, 17 Jan 2007 22:32:52 +0000 (14:32 -0800)
committerJunio C Hamano <junkio@cox.net>
Thu, 18 Jan 2007 07:48:20 +0000 (23:48 -0800)
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>
builtin-log.c

index c32a1df0bb489d5bf95aa863729dc9e0c20b3b6e..930cc0401c8a6088f1da24666e610b1c8732b497 100644 (file)
@@ -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;