Skip to content

Commit 9167c14

Browse files
author
Edward Thomson
committed
index_read_index: set flags for path_len correctly
Update the flags to reset the path_len (to emulate `index_insert`)
1 parent 046ec3c commit 9167c14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2999,6 +2999,9 @@ int git_index_read_index(
29992999
if (dup_entry) {
30003000
if ((error = index_entry_dup_nocache(&add_entry, index, dup_entry)) < 0)
30013001
goto done;
3002+
3003+
index_entry_adjust_namemask(add_entry,
3004+
((struct entry_internal *)add_entry)->pathlen);
30023005
}
30033006

30043007
if (add_entry) {

0 commit comments

Comments
 (0)