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.
This commit is contained in:
Carlos Martín Nieto 2015-11-11 00:36:15 +01:00
parent 1314af8d63
commit 16604d7469

View File

@ -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;
}
}