From: Junio C Hamano Date: Wed, 17 Jan 2007 22:32:52 +0000 (-0800) Subject: git-format-patch: make --binary on by default X-Git-Tag: v1.5.0-rc2~39 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e47f306d4bf964def1a0b29e8f7cea419471dffd;p=git.git 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 --- diff --git a/builtin-log.c b/builtin-log.c index c32a1df0b..930cc0401 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;