File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5193,6 +5193,8 @@ void repo_diff_setup(struct repository *r, struct diff_options *options)
51935193
51945194 options -> color_moved = diff_color_moved_default ;
51955195 options -> color_moved_ws_handling = diff_color_moved_ws_default ;
5196+
5197+ options -> flags .allow_autoencode = -1 ;
51965198}
51975199
51985200static const char diff_status_letters [] = {
@@ -5391,6 +5393,9 @@ void diff_setup_done(struct diff_options *options)
53915393
53925394 if (options -> pathspec .has_wildcard && options -> max_depth_valid )
53935395 die ("max-depth cannot be used with wildcard pathspecs" );
5396+
5397+ if (options -> flags .allow_autoencode == -1 )
5398+ options -> flags .allow_autoencode = !options -> flags .binary ;
53945399}
53955400
53965401int 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