Merge branch 'jh/sparse-index-resize-fix'
The sparse-index support can corrupt the index structure by storing a stale and/or uninitialized data, which has been corrected. * jh/sparse-index-resize-fix: sparse-index: copy dir_hash in ensure_full_index()
This commit is contained in:
commit
6f9e7cadf3
@ -283,6 +283,7 @@ void ensure_full_index(struct index_state *istate)
|
||||
|
||||
/* Copy back into original index. */
|
||||
memcpy(&istate->name_hash, &full->name_hash, sizeof(full->name_hash));
|
||||
memcpy(&istate->dir_hash, &full->dir_hash, sizeof(full->dir_hash));
|
||||
istate->sparse_index = 0;
|
||||
free(istate->cache);
|
||||
istate->cache = full->cache;
|
||||
|
Loading…
Reference in New Issue
Block a user