From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 12B431F910 for ; Sun, 13 Nov 2022 05:01:58 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=ttaylorr-com.20210112.gappssmtp.com header.i=@ttaylorr-com.20210112.gappssmtp.com header.b="MGIPRKdv"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232902AbiKMFBz (ORCPT ); Sun, 13 Nov 2022 00:01:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbiKMFBy (ORCPT ); Sun, 13 Nov 2022 00:01:54 -0500 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A027013E2A for ; Sat, 12 Nov 2022 21:01:53 -0800 (PST) Received: by mail-io1-xd36.google.com with SMTP id e189so6166912iof.1 for ; Sat, 12 Nov 2022 21:01:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ttaylorr-com.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=j56K9k3dlqCw2MZvMkOSsU5zlXr723f6bZL+pPkDrY4=; b=MGIPRKdvofBdSTfDLngmeVBvozO++utfjO5ZbhgkObG55gqTJ/alPTn66plwiBDLUi 8hnExQtDFpMpj628cjqMXm0xoU0Dsxl/TtvhDYJMrwZYWYyEQYmvIHhs3PVeRBImEOfh vhE2o7CdrEVw4AHpXQ8f1kScvzTFq3mZYfO4l9GRQI8tceNKstxkse8CDDQEfKNF6e8q ioeRp2blwxKCKYVugnOlqns3N17mFcdCAlCvx05LUToleIjMvJMJgtO4IUIQhP1L1+A3 60PPjojvVVI3jYGZAgv4XAw3ZAMQh6EIfaA8jnalvzrgdyTtgJEftvxVMMY0vbtaeyl3 uDSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=j56K9k3dlqCw2MZvMkOSsU5zlXr723f6bZL+pPkDrY4=; b=R4hVQYkIMzU+w7Tkfdk5MkCYQtOy1YKGi8CUwkq5/IoB1IfEYW77ubYgmD5O1PypEJ Ygn621LTvnjw1gTdUOAC5rnBaADXNp5lHzs45uaiQTnHdguz2q84rtnKWTyysA6M02VW A+3J0CoEj6aN1ubUkVYsJn9t4usSYJSklSDk4Eogw1Qc9C0qNAmOnYZs0+xrjebdZL4U 5Vg7rXzKwFT/DuKgV1QWyt8HvSHkPhinEyUCyOr+3ecr582YhtMrVS9B3dGTf6N3vGRT rWdyul1V9Aw8l8e/yNpETDXz9rSIC65A0NVz4bUmXaTn7DVaKt+QhpSlaVokJoJ7QuvI qzcg== X-Gm-Message-State: ANoB5pnUu8BpJ/4nL8ftE/wR5M8DeCBdwJIi/Qih2ITaUAatHFiFZ9Er nHwOXvnl1XPwBnqeC5dQeiZkdg== X-Google-Smtp-Source: AA0mqf4aFb23HcWa+mYFmehBbTEfWiwW+e5p03x5Sa+znl7A6p7Bs+DzQMWwuzAAUFENpCt+C1NzRQ== X-Received: by 2002:a05:6638:3d07:b0:363:46aa:76e9 with SMTP id cl7-20020a0566383d0700b0036346aa76e9mr3712541jab.249.1668315713042; Sat, 12 Nov 2022 21:01:53 -0800 (PST) Received: from localhost (104-178-186-189.lightspeed.milwwi.sbcglobal.net. [104.178.186.189]) by smtp.gmail.com with ESMTPSA id y7-20020a056602178700b006cf3a1c02e6sm2429838iox.15.2022.11.12.21.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 21:01:52 -0800 (PST) Date: Sun, 13 Nov 2022 00:01:51 -0500 From: Taylor Blau To: Jeff King Cc: =?utf-8?B?UmVuw6k=?= Scharfe , Git List , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Junio C Hamano , Taylor Blau , Christian Couder , Jonathan Tan Subject: Re: [PATCH 1/3] pack-objects: fix handling of multiple --filter options Message-ID: References: <53bffbf4-8308-0dd7-bca5-7c85b8334e05@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Sat, Nov 12, 2022 at 11:58:44AM -0500, Jeff King wrote: > On Sat, Nov 12, 2022 at 11:44:00AM +0100, René Scharfe wrote: > > > Since 5cb28270a1 (pack-objects: lazily set up "struct rev_info", don't > > leak, 2022-03-28) --filter options given to git pack-objects overrule > > earlier ones, letting only the leftmost win and leaking the memory > > allocated for earlier ones. Fix that by only initializing the rev_info > > struct once. > > Yikes. I wondered how we managed to miss this in the tests. Surely we > have some examples that use multiple filters? > > I think the answer is that we do in t5616, but in practice they didn't > hit this bug because of the way filter-specs are treated server-sid3. > Even if we say "clone --filter=foo --filter=bar" on the client, the > server upload-pack coalesces that into a single "combine:foo+bar" > string, and that's what its pack-objects sees. ...Or in other words, clients aren't broken here because we always send "combine" filters when multiple `--filter` arguments are passed to `git clone`, `git fetch`, etc. Is that always the case? I *think* so, but it would be nice to know if there was a way that clients would not send the `combine` filter with >1 filter. Thanks, Taylor