@@ -427,7 +427,7 @@ static int pathname_entry_cmp(const void *unused_cmp_data,
427
427
}
428
428
429
429
struct collection_status {
430
- enum { FROM_WORKTREE = 0 , FROM_INDEX = 1 } phase ;
430
+ enum { FROM_WORKTREE = 0 , FROM_INDEX = 1 } mode ;
431
431
432
432
const char * reference ;
433
433
@@ -473,9 +473,9 @@ static void collect_changes_cb(struct diff_queue_struct *q,
473
473
}
474
474
475
475
file_item = entry -> item ;
476
- adddel = s -> phase == FROM_INDEX ?
476
+ adddel = s -> mode == FROM_INDEX ?
477
477
& file_item -> index : & file_item -> worktree ;
478
- other_adddel = s -> phase == FROM_INDEX ?
478
+ other_adddel = s -> mode == FROM_INDEX ?
479
479
& file_item -> worktree : & file_item -> index ;
480
480
adddel -> seen = 1 ;
481
481
adddel -> add = stat .files [i ]-> added ;
@@ -526,9 +526,9 @@ static int get_modified_files(struct repository *r,
526
526
struct setup_revision_opt opt = { 0 };
527
527
528
528
if (filter == INDEX_ONLY )
529
- s .phase = i ? FROM_WORKTREE : FROM_INDEX ;
529
+ s .mode = ( i == 0 ) ? FROM_INDEX : FROM_WORKTREE ;
530
530
else
531
- s .phase = i ? FROM_INDEX : FROM_WORKTREE ;
531
+ s .mode = ( i == 0 ) ? FROM_WORKTREE : FROM_INDEX ;
532
532
s .skip_unseen = filter && i ;
533
533
534
534
opt .def = is_initial ?
@@ -544,7 +544,7 @@ static int get_modified_files(struct repository *r,
544
544
if (ps )
545
545
copy_pathspec (& rev .prune_data , ps );
546
546
547
- if (s .phase == FROM_INDEX )
547
+ if (s .mode == FROM_INDEX )
548
548
run_diff_index (& rev , 1 );
549
549
else {
550
550
rev .diffopt .flags .ignore_dirty_submodules = 1 ;
0 commit comments