Re: [PATCH 3/5] refspec: output a refspec item
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 7, 2021, 22:49 UTC
- Message-ID
- <xmqqy2dtww0h.fsf@gitster.g>
- In-Reply-To
- <87czv5kaxw.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 5 quoted lines
> 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 = $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"?