Skip to content

Commit

Permalink
builtin-merge.c: use standard active_cache macros
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Dec 26, 2009
1 parent 902f235 commit be6ff81
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions builtin-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit be6ff81

Please sign in to comment.