Skip to content

Commit 1e02bf2

Browse files
committed
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 <[email protected]>
1 parent 8c15904 commit 1e02bf2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

add-interactive.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ static int get_modified_files(struct repository *r, struct string_list *files,
435435
rev.diffopt.flags.ignore_dirty_submodules = 1;
436436
run_diff_files(&rev, 0);
437437
}
438+
439+
if (ps)
440+
clear_pathspec(&rev.prune_data);
438441
}
439442
hashmap_free_entries(&s.file_map, struct pathname_entry, ent);
440443

0 commit comments

Comments
 (0)