summaryrefslogtreecommitdiff
path: root/builtin/update-index.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2015-12-29 07:09:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-12-29 21:38:41 (GMT)
commit9624a22ac603d3d59622b1f45a62d02f5fe55a25 (patch)
tree906c85d1e281c2245e281f828eae1e834283ef02 /builtin/update-index.c
parentf900c8326a43303685c46b279b9f70411bff1a4b (diff)
downloadgit-9624a22ac603d3d59622b1f45a62d02f5fe55a25.zip
git-9624a22ac603d3d59622b1f45a62d02f5fe55a25.tar.gz
git-9624a22ac603d3d59622b1f45a62d02f5fe55a25.tar.bz2
dir: free untracked cache when removing it
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/update-index.c')
-rw-r--r--builtin/update-index.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 7431938..a6fff87 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -1123,6 +1123,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
add_untracked_ident(the_index.untracked);
the_index.cache_changed |= UNTRACKED_CHANGED;
} else if (!untracked_cache && the_index.untracked) {
+ free_untracked_cache(the_index.untracked);
the_index.untracked = NULL;
the_index.cache_changed |= UNTRACKED_CHANGED;
}