Commit 80745b1256f4cf04f72f90e42a07ce9ac80bfe19

Edward Thomson 2016-06-02T01:04:58

index_read_index: set flags for path_len correctly Update the flags to reset the path_len (to emulate `index_insert`)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/index.c b/src/index.c
index b1ee65f..430a34f 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) {