summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-05-20 08:33:29 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-05-20 08:33:29 -0700
commitfde4622c0866af528e6f2c4e6bb68d83b13695bf (patch)
tree7fa02c16d0a2c41343ee9e61874ec4e426a286f9 /unpack-trees.c
parentMerge branch 'ds/trace-log-progress-fix' (diff)
parentunpack-trees: also allow get_progress() to work on a different index (diff)
downloadtgif-fde4622c0866af528e6f2c4e6bb68d83b13695bf.tar.xz
Merge branch 'en/sparse-checkout'
Consistency fix to a topic already in 'master'. * en/sparse-checkout: unpack-trees: also allow get_progress() to work on a different index
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 02048dfdac..4be5fc3075 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -333,10 +333,10 @@ static void load_gitmodules_file(struct index_state *index,
}
}
-static struct progress *get_progress(struct unpack_trees_options *o)
+static struct progress *get_progress(struct unpack_trees_options *o,
+ struct index_state *index)
{
unsigned cnt = 0, total = 0;
- struct index_state *index = &o->result;
if (!o->update || !o->verbose_update)
return NULL;
@@ -415,7 +415,7 @@ static int check_updates(struct unpack_trees_options *o,
if (o->clone)
setup_collided_checkout_detection(&state, index);
- progress = get_progress(o);
+ progress = get_progress(o, index);
git_attr_set_direction(GIT_ATTR_CHECKOUT);