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>2009-12-18 09:23:54 +0300
committerJunio C Hamano <gitster@pobox.com>2009-12-26 04:10:10 +0300
commitbe6ff8196d9890c1875a75b96320b863dd1fe815 (patch)
tree7f37267c444f4c0456dc291c68bacf4b64e9d066 /builtin-merge.c
parent902f235378cb2b2f6dd5dd664b9630c95321f0ae (diff)
builtin-merge.c: use standard active_cache macros
Instead of using the low-level index_state interface, use the bog standard active_cache and active_nr macros to access the cache entries when using the default one. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-merge.c')
-rw-r--r--builtin-merge.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin-merge.c b/builtin-merge.c
index f1c84d759d..6cb804b6ce 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -618,11 +618,10 @@ static void count_diff_files(struct diff_queue_struct *q,
static int count_unmerged_entries(void)
{
- const struct index_state *state = &the_index;
int i, ret = 0;
- for (i = 0; i < state->cache_nr; i++)
- if (ce_stage(state->cache[i]))
+ for (i = 0; i < active_nr; i++)
+ if (ce_stage(active_cache[i]))
ret++;
return ret;