Skip to content

Commit

Permalink
git-format-patch: make --binary on by default
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 18, 2007
1 parent c261e43 commit e47f306
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions builtin-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e47f306

Please sign in to comment.