Skip to content

Commit

Permalink
dir: free untracked cache when removing it
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Dec 29, 2015
1 parent f900c83 commit 9624a22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions builtin/update-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9624a22

Please sign in to comment.