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

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

From
Derrick Stolee <stolee@gmail.com>
Date
Nov 27, 2019, 14:22 UTC
Message-ID
<34a0ae8e-a0f3-e263-e386-2fbbc49f0d07@gmail.com>
In-Reply-To
<20191122083704.29267-1-mh@glandium.org>
On 11/22/2019 3:37 AM, Mike Hommey wrote:
Show 22 quoted lines
> 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);
Looks good. Thanks for catching and fixing this!
-Stolee
Previous: Junio C Hamano
Message 7 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.