git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] revision: clear the topo-walk flags in reset_revision_walk

From
Mike Hommey <mh@glandium.org>
Date
Nov 22, 2019, 08:37 UTC
Message-ID
<20191122083704.29267-1-mh@glandium.org>

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
Next: Mike Hommey
Message 1 of 7 in “revision: clear the topo-walk flags in reset_revision_walk”
  1. 1/2 revision: clear the topo-walk flags in reset_revision_walkMike Hommey, Nov 22, 2019
  2. 2/2 revision: free topo_walk_info before creating a new one in init_topo_walkMike Hommey, Nov 22, 2019
  3. Derrick StoleeNov 27, 2019
  4. Junio C HamanoDec 1, 2019
  5. Derrick StoleeDec 4, 2019
  6. Junio C HamanoDec 4, 2019
  7. Derrick StoleeNov 27, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.