Skip to content

Commit be6ff81

Browse files
committed
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 <[email protected]>
1 parent 902f235 commit be6ff81

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

builtin-merge.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,11 +618,10 @@ static void count_diff_files(struct diff_queue_struct *q,
618618

619619
static int count_unmerged_entries(void)
620620
{
621-
const struct index_state *state = &the_index;
622621
int i, ret = 0;
623622

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]))
626625
ret++;
627626

628627
return ret;

0 commit comments

Comments
 (0)