Thread (221 messages) 221 messages, 6 authors, 2022-07-12

Re: [PATCH v2 06/27] revision.[ch]: provide and start using a release_revisions()

From: Junio C Hamano <hidden>
Date: 2022-03-24 04:53:13

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
quoted hunk ↗ jump to hunk
diff --git a/revision.c b/revision.c
index 303d1188207..90bac9ada03 100644
--- a/revision.c
+++ b/revision.c
@@ -2933,6 +2933,13 @@ static void release_revisions_commit_list(struct rev_info *revs)
 	revs->commits = NULL;
 }
 
+void release_revisions(struct rev_info *revs)
+{
+	if (!revs)
+		return;
+	object_array_clear(&revs->pending);
+}
Yay.

It is unclear why we want to allow passing NULL to this, though.  Do
we even have any code paths that allocate on-heap rev-info?  Address
of an on-stack or global rev_info will never be NULL.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help