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:
authorElijah Newren <newren@gmail.com>2020-05-14 22:53:22 +0300
committerJunio C Hamano <gitster@pobox.com>2020-05-15 17:59:27 +0300
commit6c34239de67e03390622dfad14d91ed3ce1048b5 (patch)
tree66a722c9620e416f367724415937062020e54310 /unpack-trees.c
parent5644ca28cded68972c74614fc06d6e0e1db1a7de (diff)
unpack-trees: also allow get_progress() to work on a different index
commit b0a5a12a60 ("unpack-trees: allow check_updates() to work on a different index", 2020-03-27) allowed check_updates() to work on a different index, but it called get_progress() which was hardcoded to work on o->result much like check_updates() had been. Update it to also accept an index parameter and have check_updates() pass that parameter along so that both are working on the same index. Noticed-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 b43f3e775a..8caf5e8ecc 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;
@@ -414,7 +414,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);