Thread (19 messages) 19 messages, 1 author, 2019-11-29
STALE2432d

[PATCH v2 1/9] add-interactive: make sure to release `rev.prune_data`

From: Johannes Schindelin via GitGitGadget <hidden>
Date: 2019-11-29 21:11:55
Subsystem: the rest · Maintainer: Linus Torvalds

From: Johannes Schindelin <redacted>

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 <redacted>
---
 add-interactive.c | 3 +++
 1 file changed, 3 insertions(+)
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);
 
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help