Skip to content

Commit 2134c3f

Browse files
committed
Merge branch 'ab/progress-cleanup'
Code clean-up. * ab/progress-cleanup: read-cache.c: don't guard calls to progress.c API
2 parents 8e48f11 + b7b793d commit 2134c3f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

read-cache.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,8 +1628,7 @@ int refresh_index(struct index_state *istate, unsigned int flags,
16281628
t2_sum_scan += t2_did_scan;
16291629
if (new_entry == ce)
16301630
continue;
1631-
if (progress)
1632-
display_progress(progress, i);
1631+
display_progress(progress, i);
16331632
if (!new_entry) {
16341633
const char *fmt;
16351634

@@ -1664,10 +1663,8 @@ int refresh_index(struct index_state *istate, unsigned int flags,
16641663
trace2_data_intmax("index", NULL, "refresh/sum_lstat", t2_sum_lstat);
16651664
trace2_data_intmax("index", NULL, "refresh/sum_scan", t2_sum_scan);
16661665
trace2_region_leave("index", "refresh", NULL);
1667-
if (progress) {
1668-
display_progress(progress, istate->cache_nr);
1669-
stop_progress(&progress);
1670-
}
1666+
display_progress(progress, istate->cache_nr);
1667+
stop_progress(&progress);
16711668
trace_performance_leave("refresh index");
16721669
return has_errors;
16731670
}

0 commit comments

Comments
 (0)