]> git.99rst.org Git - git.git/commit
read-cache: split out function to drop unmerged entries to stage 0
authorPatrick Steinhardt <redacted>
Wed, 1 Jul 2026 11:35:28 +0000 (13:35 +0200)
committerJunio C Hamano <redacted>
Wed, 1 Jul 2026 16:56:52 +0000 (09:56 -0700)
commitca39c3511d89dd9c84a90b0a4dc394a950e08772
tree1572260a9faa6898b664fbeaa7e07700ddc304dd
parent1666c1265231b0bc5f613fbbf3f0a9896cdef76e
read-cache: split out function to drop unmerged entries to stage 0

In `repo_read_index_unmerged()` we read the index and then drop any
unmerged entries to stage 0. In a subsequent commit we'll want to
perform this operation on arbitrary indexes, not only the one of the
given repository.

Prepare for this by splitting out the functionality into a new function
that can act on an arbitrary index.

While at it, fix a signedness mismatch when iterating through the index
cache entries.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
read-cache-ll.h
read-cache.c
git clone https://git.99rst.org/PROJECT