Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-20 18:33:29 +0300
committerJunio C Hamano <gitster@pobox.com>2020-05-20 18:33:29 +0300
commitfde4622c0866af528e6f2c4e6bb68d83b13695bf (patch)
tree7fa02c16d0a2c41343ee9e61874ec4e426a286f9 /unpack-trees.c
parent85d6e28a620c91c5c789b38271a662b384269d46 (diff)
parent6c34239de67e03390622dfad14d91ed3ce1048b5 (diff)
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);