diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-05-30 05:16:45 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-30 05:16:45 +0300 |
commit | fa0624f79f9d5765d09598b003124b3cf0b9acdb (patch) | |
tree | 838b81830a401c56d3b9409a3fd891b00ef6f8ec /read-cache.c | |
parent | 35d802d296df4c1f9f058c4dc9c934a872df6bfe (diff) | |
parent | edf3b90553f5c667cd8cb99aa809305470ba3bd7 (diff) |
Merge branch 'dt/unpack-save-untracked-cache-extension'
When "git checkout", "git merge", etc. manipulates the in-core
index, various pieces of information in the index extensions are
discarded from the original state, as it is usually not the case
that they are kept up-to-date and in-sync with the operation on the
main index. The untracked cache extension is copied across these
operations now, which would speed up "git status" (as long as the
cache is properly invalidated).
* dt/unpack-save-untracked-cache-extension:
unpack-trees: preserve index extensions
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c index 22ab8b5b616..92eb15c0004 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2625,3 +2625,9 @@ void stat_validity_update(struct stat_validity *sv, int fd) fill_stat_data(sv->sd, &st); } } + +void move_index_extensions(struct index_state *dst, struct index_state *src) +{ + dst->untracked = src->untracked; + src->untracked = NULL; +} |