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=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 CDE241F4B4 for ; Wed, 7 Apr 2021 22:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229515AbhDGWte (ORCPT ); Wed, 7 Apr 2021 18:49:34 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:52038 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbhDGWtd (ORCPT ); Wed, 7 Apr 2021 18:49:33 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 60E8D135E3A; Wed, 7 Apr 2021 18:49:23 -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:content-transfer-encoding; s=sasl; bh=dQ3ckYNcFEud rhlV+s6ZQfMqtEo=; b=PggA3pwUaAPFc41km0bgv2C23BRQGIIy3gjF08OOuVVD Pg9GDcSP1vztYICUnve7H2xeYlF/m62MIOEyZH8iPyU6fQRL1dDzL8nObAgspldJ klPi6Q9j4agHWp/G+240+TiM3ndgRUTjg0V0wKd37gY93BWfWFJk2FHbzPzmEvg= 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:content-transfer-encoding; q=dns; s=sasl; b=TQWJ2W 2yiwOWiBQClHMmZZek81AkhauWzB9Yuh9K7nFFP6T/Kd3m27MSmxq7J/Og9q0C26 kT/d+o6MYk854w2cW4eevDzkjEV0xz9f0tPds1sxF1M17OUOfcD2JheMq09Eh7rw PErvqAS1Tbusho3g4r4u8+aGrUQNZXhzB5rMw= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 42805135E39; Wed, 7 Apr 2021 18:49:23 -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-smtp21.pobox.com (Postfix) with ESMTPSA id 68D61135E38; Wed, 7 Apr 2021 18:49:20 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Derrick Stolee , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Cc: Derrick Stolee via GitGitGadget , git@vger.kernel.org, tom.saeger@oracle.com, sunshine@sunshineco.com, Derrick Stolee , Derrick Stolee Subject: Re: [PATCH 3/5] refspec: output a refspec item References: <87r1jmjxdg.fsf@evledraar.gmail.com> <87czv5kaxw.fsf@evledraar.gmail.com> Date: Wed, 07 Apr 2021 15:49:18 -0700 In-Reply-To: <87czv5kaxw.fsf@evledraar.gmail.com> (=?utf-8?B?IsOGdmFyIEFy?= =?utf-8?B?bmZqw7Zyw7A=?= Bjarmason"'s message of "Thu, 08 Apr 2021 00:05:15 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 7D915F46-97F3-11EB-9606-D609E328BF65-77302942!pb-smtp21.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason writes: > On Wed, Apr 07 2021, Derrick Stolee wrote: > >> The purpose is to allow us to modify a 'struct refspec_item' >> andproduce a refspec string instead of munging a refspec string >> directly. Ouch. I thought the goal was to take [remote "origin"] fetch =3D $src:$dst let the code that is used in the actual fetching to parse it into the in-core "refspec_item", and then transform the refspec_item by - discarding it if the item does not result in storing in the real fetch - tweaking $dst side so that it won't touch anywhere outside refs/prefetch/ to avoid disturbing end-user's notion of what the latest state of the remote ref is. so that the "parsed" refspec_item is passed to the fetch machinery without ever having to be converted back to textual form. Why do we even need to "andproduce a refspec string"?