git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/2] revision: clear the topo-walk flags in reset_revision_walk
@ 2019-11-22  8:37 Mike Hommey
  2019-11-22  8:37 ` [PATCH 2/2] revision: free topo_walk_info before creating a new one in init_topo_walk Mike Hommey
  2019-11-27 14:22 ` [PATCH 1/2] revision: clear the topo-walk flags in reset_revision_walk Derrick Stolee
  0 siblings, 2 replies; 7+ messages in thread
From: Mike Hommey @ 2019-11-22  8:37 UTC (permalink / raw)
  To: git; +Cc: gitster

Not doing so can lead to wrong topo-walks when using the revision walk API
consecutively.

Signed-off-by: Mike Hommey <mh@glandium.org>
---
 revision.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

As mentioned in 20191108025007.bphr7ynvskeoe6tb@glandium.org, it feels
like maybe TOPO_WALK_EXPLORED and TOPO_WALK_INDEGREE should be in
ALL_REV_FLAGS too?

diff --git a/revision.c b/revision.c
index 0e39b2b8a5..765a56ae33 100644
--- a/revision.c
+++ b/revision.c
@@ -3098,7 +3098,7 @@ static void set_children(struct rev_info *revs)
 
 void reset_revision_walk(void)
 {
-	clear_object_flags(SEEN | ADDED | SHOWN);
+	clear_object_flags(SEEN | ADDED | SHOWN | TOPO_WALK_EXPLORED | TOPO_WALK_INDEGREE);
 }
 
 static int mark_uninteresting(const struct object_id *oid,
-- 
2.24.0.dirty


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-04 19:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22  8:37 [PATCH 1/2] revision: clear the topo-walk flags in reset_revision_walk Mike Hommey
2019-11-22  8:37 ` [PATCH 2/2] revision: free topo_walk_info before creating a new one in init_topo_walk Mike Hommey
2019-11-27 14:25   ` Derrick Stolee
2019-12-01 16:22     ` Junio C Hamano
2019-12-04 18:55       ` Derrick Stolee
2019-12-04 19:47         ` Junio C Hamano
2019-11-27 14:22 ` [PATCH 1/2] revision: clear the topo-walk flags in reset_revision_walk Derrick Stolee

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).