File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
101
101
struct cache_entry * ce = active_cache [i ];
102
102
int changed ;
103
103
unsigned dirty_submodule = 0 ;
104
+ const unsigned char * old_sha1 , * new_sha1 ;
104
105
105
106
if (diff_can_quit_early (& revs -> diffopt ))
106
107
break ;
@@ -224,9 +225,12 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
224
225
continue ;
225
226
}
226
227
oldmode = ce -> ce_mode ;
228
+ old_sha1 = ce -> sha1 ;
229
+ new_sha1 = changed ? null_sha1 : ce -> sha1 ;
227
230
diff_change (& revs -> diffopt , oldmode , newmode ,
228
- ce -> sha1 , (changed ? null_sha1 : ce -> sha1 ),
229
- !is_null_sha1 (ce -> sha1 ), (changed ? 0 : !is_null_sha1 (ce -> sha1 )),
231
+ old_sha1 , new_sha1 ,
232
+ !is_null_sha1 (old_sha1 ),
233
+ !is_null_sha1 (new_sha1 ),
230
234
ce -> name , 0 , dirty_submodule );
231
235
232
236
}
You can’t perform that action at this time.
0 commit comments