From e47f306d4bf964def1a0b29e8f7cea419471dffd Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 17 Jan 2007 14:32:52 -0800 Subject: [PATCH] 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 --- builtin-log.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.30.2