aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--builtin/add.c1
-rw-r--r--diff-lib.c1
-rw-r--r--wt-status.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/builtin/add.c b/builtin/add.c
index f507d2191c..115a26ea63 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -143,6 +143,7 @@ int add_files_to_cache(const char *prefix,
rev.max_count = 0; /* do not compare unmerged paths with stage #2 */
run_diff_files(&rev, DIFF_RACY_IS_MODIFIED);
clear_pathspec(&rev.prune_data);
+ release_revisions(&rev);
return !!data.add_errors;
}
diff --git a/diff-lib.c b/diff-lib.c
index d6800274bd..0f16281253 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -642,6 +642,7 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt)
if (diff_cache(&revs, tree_oid, NULL, 1))
exit(128);
clear_pathspec(&revs.prune_data);
+ release_revisions(&revs);
return 0;
}
diff --git a/wt-status.c b/wt-status.c
index f910062137..a14fad1e03 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -617,6 +617,7 @@ static void wt_status_collect_changes_worktree(struct wt_status *s)
copy_pathspec(&rev.prune_data, &s->pathspec);
run_diff_files(&rev, 0);
clear_pathspec(&rev.prune_data);
+ release_revisions(&rev);
}
static void wt_status_collect_changes_index(struct wt_status *s)