summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-06-02 01:04:58 -0500
committerEdward Thomson <ethomson@github.com>2016-06-02 02:36:50 -0500
commit9167c1450e45f713448ed4c0c6cb13344f69d40a (patch)
tree145cb19a08098a248b0e512bb18d528688d84846 /src
parent046ec3c9d68d4a79ed7efb044d275c62e8a49873 (diff)
downloadlibgit2-9167c1450e45f713448ed4c0c6cb13344f69d40a.tar.gz
index_read_index: set flags for path_len correctly
Update the flags to reset the path_len (to emulate `index_insert`)
Diffstat (limited to 'src')
-rw-r--r--src/index.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/index.c b/src/index.c
index b1ee65ffe..430a34f8e 100644
--- a/src/index.c
+++ b/src/index.c
@@ -2999,6 +2999,9 @@ int git_index_read_index(
if (dup_entry) {
if ((error = index_entry_dup_nocache(&add_entry, index, dup_entry)) < 0)
goto done;
+
+ index_entry_adjust_namemask(add_entry,
+ ((struct entry_internal *)add_entry)->pathlen);
}
if (add_entry) {