Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16604d7

Browse files
committed
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.
1 parent 1314af8 commit 16604d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ int git_index_conflict_add(git_index *index,
16911691
for (i = 0; i < 3; i++) {
16921692
if (entries[i] && !valid_filemode(entries[i]->mode)) {
16931693
giterr_set(GITERR_INDEX, "invalid filemode for stage %d entry",
1694-
i);
1694+
i + 1);
16951695
return -1;
16961696
}
16971697
}

0 commit comments

Comments
 (0)