Library function to check for unmerged index entries

It's small, but it was in three places already, so it should be in the
library.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
This commit is contained in:
Daniel Barkalow
2008-02-07 11:40:13 -05:00
committed by Junio C Hamano
parent 922d87f92f
commit 94a5728cfb
4 changed files with 15 additions and 26 deletions

View File

@ -1176,6 +1176,16 @@ int discard_index(struct index_state *istate)
return 0;
}
int unmerged_index(struct index_state *istate)
{
int i;
for (i = 0; i < istate->cache_nr; i++) {
if (ce_stage(istate->cache[i]))
return 1;
}
return 0;
}
#define WRITE_BUFFER_SIZE 8192
static unsigned char write_buffer[WRITE_BUFFER_SIZE];
static unsigned long write_buffer_len;