Subject: Re: [PATCH 06/19] refspec: remove global tag refspec structure

From: Junio C Hamano <[email-masked]>
Date: Wed, 29 May 2024 10:47:45 -0700

Patrick Steinhardt <[email-masked]> writes:

> +	refspec_item_init(&tag_refspec, TAG_REFSPEC, 0);
> ...
> -static struct refspec_item s_tag_refspec = {
> -	.force = 0,
> -	.pattern = 1,
> -	.matching = 0,
> -	.exact_sha1 = 0,
> -	.negative = 0,
> -	.src = "refs/tags/*",
> -	.dst = "refs/tags/*",
> -};

Regardless of the constness issue, replacing these hardcoded
initializer values that is an accident waiting to happen with a call
to refspec_item_init() is very much welcomed.

Unless parse_refspec() is an immensely high cost operation, which it
isn't.