diff --git a/builtin-mv.c b/builtin-mv.c
index fd1e52098174be212c51b957280f38dc6e9c0e48..54dd3bfe8ac787fda32f3557faac00c65a61de96 100644 (file)
--- a/builtin-mv.c
+++ b/builtin-mv.c
int j, dst_len;
if (last - first > 0) {
- source = realloc(source,
+ source = xrealloc(source,
(count + last - first)
* sizeof(char *));
- destination = realloc(destination,
+ destination = xrealloc(destination,
(count + last - first)
* sizeof(char *));
- modes = realloc(modes,
+ modes = xrealloc(modes,
(count + last - first)
* sizeof(enum update_mode));
}
for (i = 0; i < deleted.nr; i++) {
const char *path = deleted.items[i].path;
remove_file_from_cache(path);
+ cache_tree_invalidate_path(active_cache_tree, path);
}
if (active_cache_changed) {