@matheusbsbs / matheus-bagliano / commits / 0c3944a628
Fork 0

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>

Johannes Schindelin committed Nov 29, 2019 at 21:11 UTC 0c3944a628e46f6abb1add20f19641c5bbef8a1a
1 file changed +3
add-interactive.c
+3
@@ -435,6 +435,9 @@ static int get_modified_files(struct repository *r, struct string_list *files,
435 rev.diffopt.flags.ignore_dirty_submodules = 1;
436 run_diff_files(&rev, 0);
437 }
438 +
439 + if (ps)
440 + clear_pathspec(&rev.prune_data);
441 }
442 hashmap_free_entries(&s.file_map, struct pathname_entry, ent);
443