@@ -1567,10 +1567,6 @@ int refresh_index(struct index_state *istate, unsigned int flags,
int t2_sum_lstat = 0;
int t2_sum_scan = 0;
- progress = start_delayed_progress_if_tty(_("Refresh index"),
- istate->cache_nr,
- flags & REFRESH_PROGRESS ? -1 : 0);
-
trace_performance_enter();
modified_fmt = in_porcelain ? "M\t%s\n" : "%s: needs update\n";
deleted_fmt = in_porcelain ? "D\t%s\n" : "%s: needs update\n";
@@ -1583,6 +1579,11 @@ int refresh_index(struct index_state *istate, unsigned int flags,
* we only have to do the special cases that are left.
*/
preload_index(istate, pathspec, 0);
+
+ progress = start_delayed_progress_if_tty(_("Refresh index"),
+ istate->cache_nr,
+ flags & REFRESH_PROGRESS ? -1 : 0);
+
trace2_region_enter("index", "refresh", NULL);
/* TODO: audit for interaction with sparse-index. */
ensure_full_index(istate);