From patchwork Fri Nov 22 08:37:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Hommey X-Patchwork-Id: 11257501 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9941F913 for ; Fri, 22 Nov 2019 08:54:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8390920714 for ; Fri, 22 Nov 2019 08:54:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727139AbfKVIye (ORCPT ); Fri, 22 Nov 2019 03:54:34 -0500 Received: from ns332406.ip-37-187-123.eu ([37.187.123.207]:34194 "EHLO glandium.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726546AbfKVIye (ORCPT ); Fri, 22 Nov 2019 03:54:34 -0500 Received: from glandium by mitsuha.glandium.org with local (Exim 4.92.3) (envelope-from ) id 1iY4R6-0007cq-IG; Fri, 22 Nov 2019 17:37:04 +0900 From: Mike Hommey To: git@vger.kernel.org Cc: gitster@pobox.com Subject: [PATCH 1/2] revision: clear the topo-walk flags in reset_revision_walk Date: Fri, 22 Nov 2019 17:37:03 +0900 Message-Id: <20191122083704.29267-1-mh@glandium.org> X-Mailer: git-send-email 2.24.0.dirty MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Not doing so can lead to wrong topo-walks when using the revision walk API consecutively. Signed-off-by: Mike Hommey --- 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,