Commit b419fe2d by Carlos Martín Nieto Committed by Vicent Marti

Invalidate the path when removing from the index

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
parent e23ede0d
......@@ -490,7 +490,13 @@ int git_index_append2(git_index *index, const git_index_entry *source_entry)
int git_index_remove(git_index *index, int position)
{
git_index_entry *entry;
git_vector_sort(&index->entries);
entry = git_vector_get(&index->entries, position);
if (entry != NULL)
git_tree_cache_invalidate_path(index->tree, entry->path);
return git_vector_remove(&index->entries, (unsigned int)position);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment