diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-11-12 11:54:06 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-11-12 12:11:45 +0100 |
commit | ad8509ef9faeb1db0693eeb1af98aa1fdad0b874 (patch) | |
tree | 9cc7b4bd58356e4f072314ed7f4a26b722766340 /src/index.c | |
parent | 16604d74697cff526b0fc1cd2b03bedd56641059 (diff) | |
download | libgit2-ad8509ef9faeb1db0693eeb1af98aa1fdad0b874.tar.gz |
index: overwrite the path when inserting conflictsntk/case_index_conflicts
When we insert a conflict in a case-insensitive index, accept the
new entry's path as the correct case instead of leaving the path we
already had.
This puts `git_index_conflict_add()` on the same level as
`git_index_add()` in this respect.
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index f9fff27ba..d3b8afd39 100644 --- a/src/index.c +++ b/src/index.c @@ -1718,7 +1718,7 @@ int git_index_conflict_add(git_index *index, /* Make sure stage is correct */ GIT_IDXENTRY_STAGE_SET(entries[i], i + 1); - if ((ret = index_insert(index, &entries[i], 0, true, true)) < 0) + if ((ret = index_insert(index, &entries[i], 1, true, true)) < 0) goto on_error; entries[i] = NULL; /* don't free if later entry fails */ |