git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Mike Hommey <mh@glandium.org>, git@vger.kernel.org
Cc: gitster@pobox.com
Subject: Re: [PATCH 1/2] revision: clear the topo-walk flags in reset_revision_walk
Date: Wed, 27 Nov 2019 09:22:20 -0500	[thread overview]
Message-ID: <34a0ae8e-a0f3-e263-e386-2fbbc49f0d07@gmail.com> (raw)
In-Reply-To: <20191122083704.29267-1-mh@glandium.org>

On 11/22/2019 3:37 AM, Mike Hommey wrote:
> 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

      parent reply	other threads:[~2019-11-27 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Derrick Stolee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34a0ae8e-a0f3-e263-e386-2fbbc49f0d07@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).