@matheusbsbs / matheus-bagliano / commits / be6ff8196d
Fork 0

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>

Junio C Hamano committed Dec 17, 2009 at 22:23 UTC be6ff8196d9890c1875a75b96320b863dd1fe815
1 file changed +2 -3
builtin-merge.c
+2 -3
@@ -618,11 +618,10 @@ static void count_diff_files(struct diff_queue_struct *q,
618
619 static int count_unmerged_entries(void)
620 {
621 - const struct index_state *state = &the_index;
621 int i, ret = 0;
622
624 - for (i = 0; i < state->cache_nr; i++)
625 - if (ce_stage(state->cache[i]))
623 + for (i = 0; i < active_nr; i++)
624 + if (ce_stage(active_cache[i]))
625 ret++;
626
627 return ret;