Re: [PATCH 1/5] remote: don't use remote->{fetch,push}_refspec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SZEDER Gábor <szeder.dev@xxxxxxxxx> writes:

> diff --git a/remote.c b/remote.c
> index 336db8298..a021decee 100644
> --- a/remote.c
> +++ b/remote.c
> @@ -919,6 +919,26 @@ char *apply_refspecs(struct refspec *refspecs, int nr_refspec,
>  	return query.dst;
>  }
>  
> +void strbuf_add_refspec(struct strbuf *sb, const struct refspec *refspec)
> +{
> +	if (refspec->force)
> +		strbuf_addch(sb, '+');
> +	if (refspec->src)
> +		strbuf_addstr(sb, refspec->src);
> +	if (refspec->dst) {
> +		strbuf_addch(sb, ':');
> +		strbuf_addstr(sb, refspec->dst);
> +	} else if (!refspec->src)
> +		strbuf_addch(sb, ':');
> +}

Hmph, don't we support wildcarding (aka refspec->pattern)?

    ... goes and looks ...

Ah, even when we set the .pattern bit, we retain '*' in the string,
so the above is correct.

The last one looks a bit sloppy; shouldn't it be inspecting the
.matching bit?




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]