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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id DFC741F4B4 for ; Mon, 5 Apr 2021 18:49:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235381AbhDEStF (ORCPT ); Mon, 5 Apr 2021 14:49:05 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:64546 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234032AbhDEStE (ORCPT ); Mon, 5 Apr 2021 14:49:04 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id BCC6DB0039; Mon, 5 Apr 2021 14:48:57 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=S8Sj2rtl6IdLGwCgI+xzKmvbz8s=; b=ha9tIP DV1T0mhd8ynCPO8GCTUEKNYys8L61fC+K/wV890/NMH5NwEZNyY8xs/mzFFJDTNi A4adGu2oj+/z/hvc4z/QO/xEyzZpApXiHjA4xM+SWkVGRnix1H57tTBoV9uY/rTK I43kW3ImRBo8URyQ/kKVz10yP6i9CaMJE+QhI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=xsn6bk0+zC3uPPoC54GupWRqQ+ilJHwg 9V32Zom+cvl8DCHvrETRYQ4+Mm+szkTaYpfIVHOVAopSXqAMjfsaJRA6LiHF957Q UabLFWvy61e7hCO6Y20q4ZTQyQK144naPkl/bgWcihh2aPpp9+LHdaCfKJiq/xfe RJaHF26oiAo= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id B590CB0038; Mon, 5 Apr 2021 14:48:57 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 3F40CB0037; Mon, 5 Apr 2021 14:48:57 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Derrick Stolee Cc: Tom Saeger , git@vger.kernel.org Subject: Re: should git maintenance prefetch be taught to honor remote.fetch refspec? References: <20210401184914.qmr7jhjbhp2mt3h6@dhcp-10-154-148-175.vpn.oracle.com> <3bfd9a88-10f9-df71-bf96-f9c5654e48eb@gmail.com> <20210402182716.trbaflsjcvouff2y@brm-x62-17.us.oracle.com> <41dc2961-7ba5-a882-3416-45631e2cbb33@gmail.com> Date: Mon, 05 Apr 2021 11:48:56 -0700 In-Reply-To: (Derrick Stolee's message of "Mon, 5 Apr 2021 09:20:41 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 93DC98D4-963F-11EB-8F53-D152C8D8090B-77302942!pb-smtp1.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Derrick Stolee writes: > ... but it becomes difficult > when we intend to make a distinction between "refs/heads/" and > other sub-areas within "refs/". Finally, I punted on that > conversion and made the logic in 'prefetch' extremely obvious: > > 1. If the refspec's 'dst' starts with "refs/", then replace > that prefix with "refs/prefetch/". > > 2. If the refspec's 'dst' does not start with "refs/", then > concatenate "refs/prefetch/" and 'dst'. > > This will keep a roughly-equivalent partition of refs (some > might have previously collided that will not any more). Makes sense. Do we need to add another rule? 3. If the refspec does not have 'dst', ignore it. > I have posted my patch series [1], so please take a look. It > builds up the infrastructure to properly test such a refspec > expansion, if we wish to do so. > > [1] https://lore.kernel.org/git/pull.924.git.1617627856.gitgitgadget@gmail.com/ > > Thanks, > -Stolee Thanks.