summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2015-03-08 17:12:34 +0700
committerJunio C Hamano <gitster@pobox.com>2015-03-12 13:45:16 -0700
commitf9e6c649589e0940ccb82821107fb658277ed86b (patch)
tree4cc39b9f9bfbdc35ed6e996b6f9c1fdded2b1d55 /read-cache.c
parent83c094ad0dd2104adbbec034f802dceb1d052981 (diff)
downloadgit-f9e6c649589e0940ccb82821107fb658277ed86b.tar.gz
untracked cache: load from UNTR index extension
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c
index 3a058d008a..ee0ef049b8 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1371,6 +1371,9 @@ static int read_index_extension(struct index_state *istate,
if (read_link_extension(istate, data, sz))
return -1;
break;
+ case CACHE_EXT_UNTRACKED:
+ istate->untracked = read_untracked_extension(data, sz);
+ break;
default:
if (*ext < 'A' || 'Z' < *ext)
return error("index uses %.4s extension, which we do not understand",
@@ -1662,6 +1665,8 @@ int discard_index(struct index_state *istate)
istate->cache = NULL;
istate->cache_alloc = 0;
discard_split_index(istate);
+ free_untracked_cache(istate->untracked);
+ istate->untracked = NULL;
return 0;
}