index: correctly report which conflict stage has a wrong filemode When we're at offset 'i', we're dealing with the 'i+1' stage, since conflicts start at 1.
diff --git a/src/index.c b/src/index.c
index dcf46fe..f9fff27 100644
--- a/src/index.c
+++ b/src/index.c
@@ -1691,7 +1691,7 @@ int git_index_conflict_add(git_index *index,
for (i = 0; i < 3; i++) {
if (entries[i] && !valid_filemode(entries[i]->mode)) {
giterr_set(GITERR_INDEX, "invalid filemode for stage %d entry",
- i);
+ i + 1);
return -1;
}
}