Re: [PATCH 4/4] remote show: list tracked remote branches with -n

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

 



Olivier Marin <dkr+ml.git@xxxxxxx> writes:

> From: Olivier Marin <dkr@xxxxxxxxxxx>
>
> Signed-off-by: Olivier Marin <dkr@xxxxxxxxxxx>
> ---
>  builtin-remote.c  |   25 +++++++++++++++++++++++--
>  t/t5505-remote.sh |    3 ++-
>  2 files changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/builtin-remote.c b/builtin-remote.c
> index 851bdde..de4a4f2 100644
> --- a/builtin-remote.c
> +++ b/builtin-remote.c
> @@ -444,6 +444,25 @@ static int get_remote_ref_states(const char *name,
>  	return 0;
>  }
>  
> +static int append_ref_to_tracked_list(const char *refname,
> +	const unsigned char *sha1, int flags, void *cb_data)
> +{
> +	struct ref_states *states = cb_data;
> +	struct strbuf buf;
> +
> +	strbuf_init(&buf, 0);
> +	strbuf_addf(&buf, "%s/", states->remote->name);
> +	if (strncmp(buf.buf, refname, buf.len)) {
> +		strbuf_release(&buf);
> +		return 0;
> +	}

Doesn't this have the same issue Shawn fixed in 7ad2458 (Make "git-remote
rm" delete refs acccording to fetch specs, 2008-06-01)?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]

  Powered by Linux