From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 1C5CA1F547 for ; Mon, 3 Jul 2023 05:15:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229899AbjGCFPH (ORCPT ); Mon, 3 Jul 2023 01:15:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbjGCFPG (ORCPT ); Mon, 3 Jul 2023 01:15:06 -0400 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 938E2A7 for ; Sun, 2 Jul 2023 22:15:05 -0700 (PDT) Received: (qmail 4845 invoked by uid 109); 3 Jul 2023 05:15:05 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Mon, 03 Jul 2023 05:15:05 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 1998 invoked by uid 111); 3 Jul 2023 05:15:08 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Mon, 03 Jul 2023 01:15:08 -0400 Authentication-Results: peff.net; auth=none Date: Mon, 3 Jul 2023 01:15:04 -0400 From: Jeff King To: Taylor Blau Cc: git@vger.kernel.org, Chris Torek , Derrick Stolee , Junio C Hamano , Patrick Steinhardt Subject: Re: [PATCH v4 02/16] ref-filter.h: provide `REF_FILTER_INIT` Message-ID: <20230703051504.GB3502534@coredump.intra.peff.net> References: <7ce82b6a5a451ff183ba8d35fc0f50acccee8972.1687270849.git.me@ttaylorr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7ce82b6a5a451ff183ba8d35fc0f50acccee8972.1687270849.git.me@ttaylorr.com> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Jun 20, 2023 at 10:21:06AM -0400, Taylor Blau wrote: > From: Jeff King > > Provide a sane initialization value for `struct ref_filter`, which in a > subsequent patch will be used to initialize a new field. > > In the meantime, fix a case in test-reach.c where its `ref_filter` is > not even zero-initialized. This test-reach case scared me, but it happens to work now because commit_contains() only looks at the one field that we set. So we're not fixing a bug, but more like a bug waiting to happen. :) -Peff