diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-08-15 14:12:14 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-08-15 14:21:23 -0700 |
commit | a4882c27f8b3793d94b03fd503a0c67ad9772cf6 (patch) | |
tree | 6a782d1f7d9a99d666c2120eff56949dfb7779d3 /builtin-add.c | |
parent | 93969438dca50c7f0039fcf35e7ab82776d4122f (diff) | |
download | git-a4882c27f8b3793d94b03fd503a0c67ad9772cf6.tar.gz git-a4882c27f8b3793d94b03fd503a0c67ad9772cf6.tar.xz |
Fix "git add -u" data corruption.
This applies to 'maint' to fix a rather serious data corruption
issue. When "git add -u" affects a subdirectory in such a way
that the only changes to its contents are path removals, the
next tree object written out of that index was bogus, as the
remove codepath forgot to invalidate the cache-tree entry.
Reported by Salikh Zakirov.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-add.c')
-rw-r--r-- | builtin-add.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-add.c b/builtin-add.c index 159117106..a5fae7ca1 100644 --- a/builtin-add.c +++ b/builtin-add.c @@ -115,6 +115,7 @@ static void update_callback(struct diff_queue_struct *q, break; case DIFF_STATUS_DELETED: remove_file_from_cache(path); + cache_tree_invalidate_path(active_cache_tree, path); if (verbose) printf("remove '%s'\n", path); break; |