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>
Junio C Hamano committed
Jan 17, 2007 at 14:32 UTC
e47f306d4bf964def1a0b29e8f7cea419471dffd
1 file changed
+3
builtin-log.c
+3
@@ -470,6 +470,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
470
if (!rev.diffopt.output_format)
471
rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_SUMMARY | DIFF_FORMAT_PATCH;
472
473
+ if (!rev.diffopt.text)
474
+ rev.diffopt.binary = 1;
475
+
476
if (!output_directory)
477
output_directory = prefix;
478