File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4909,6 +4909,8 @@ void repo_diff_setup(struct repository *r, struct diff_options *options)
49094909
49104910 options -> color_moved = diff_color_moved_default ;
49114911 options -> color_moved_ws_handling = diff_color_moved_ws_default ;
4912+
4913+ options -> flags .allow_autoencode = -1 ;
49124914}
49134915
49144916static const char diff_status_letters [] = {
@@ -5107,6 +5109,9 @@ void diff_setup_done(struct diff_options *options)
51075109
51085110 if (options -> pathspec .has_wildcard && options -> max_depth_valid )
51095111 die ("max-depth cannot be used with wildcard pathspecs" );
5112+
5113+ if (options -> flags .allow_autoencode == -1 )
5114+ options -> flags .allow_autoencode = !options -> flags .binary ;
51105115}
51115116
51125117int parse_long_opt (const char * opt , const char * * argv ,
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ struct diff_flags {
194194 unsigned dirstat_by_file ;
195195 unsigned allow_textconv ;
196196 unsigned textconv_set_via_cmdline ;
197- unsigned allow_autoencode ;
197+ int allow_autoencode ;
198198 unsigned diff_from_contents ;
199199 unsigned dirty_submodules ;
200200 unsigned ignore_untracked_in_submodules ;
You can’t perform that action at this time.
0 commit comments