@@ -571,6 +571,7 @@ enum diff_symbol {
571
571
DIFF_SYMBOL_STATS_SUMMARY_INSERTS_DELETES ,
572
572
DIFF_SYMBOL_STATS_LINE ,
573
573
DIFF_SYMBOL_WORD_DIFF ,
574
+ DIFF_SYMBOL_STAT_SEP ,
574
575
DIFF_SYMBOL_SUBMODULE_ADD ,
575
576
DIFF_SYMBOL_SUBMODULE_DEL ,
576
577
DIFF_SYMBOL_SUBMODULE_UNTRACKED ,
@@ -766,6 +767,9 @@ static void emit_diff_symbol(struct diff_options *o, enum diff_symbol s,
766
767
case DIFF_SYMBOL_WORD_DIFF :
767
768
fprintf (o -> file , "%.*s" , len , line );
768
769
break ;
770
+ case DIFF_SYMBOL_STAT_SEP :
771
+ fputs (o -> stat_sep , o -> file );
772
+ break ;
769
773
default :
770
774
die ("BUG: unknown diff symbol" );
771
775
}
@@ -5077,10 +5081,10 @@ void diff_flush(struct diff_options *options)
5077
5081
if (output_format & DIFF_FORMAT_PATCH ) {
5078
5082
if (separator ) {
5079
5083
emit_diff_symbol (options , DIFF_SYMBOL_SEPARATOR , NULL , 0 , 0 );
5080
- if (options -> stat_sep ) {
5084
+ if (options -> stat_sep )
5081
5085
/* attach patch instead of inline */
5082
- fputs (options -> stat_sep , options -> file );
5083
- }
5086
+ emit_diff_symbol (options , DIFF_SYMBOL_STAT_SEP ,
5087
+ NULL , 0 , 0 );
5084
5088
}
5085
5089
5086
5090
diff_flush_patch_all_file_pairs (options );
0 commit comments