diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2019-11-29 21:11:41 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-01 07:30:53 -0800 |
commit | 0c3944a628e46f6abb1add20f19641c5bbef8a1a (patch) | |
tree | 6e44407fd1aa1c9dceaf73075bd88b76dafb5b5c /add-interactive.c | |
parent | built-in add -i: implement the `help` command (diff) | |
download | tgif-0c3944a628e46f6abb1add20f19641c5bbef8a1a.tar.xz |
add-interactive: make sure to release `rev.prune_data`
During a review, Junio Hamano pointed out that the `rev.prune_data` was
copied from another pathspec but never cleaned up.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'add-interactive.c')
-rw-r--r-- | add-interactive.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/add-interactive.c b/add-interactive.c index d6cb98cd40..de2fccb0ef 100644 --- a/add-interactive.c +++ b/add-interactive.c @@ -435,6 +435,9 @@ static int get_modified_files(struct repository *r, struct string_list *files, rev.diffopt.flags.ignore_dirty_submodules = 1; run_diff_files(&rev, 0); } + + if (ps) + clear_pathspec(&rev.prune_data); } hashmap_free_entries(&s.file_map, struct pathname_entry, ent); |