From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH 1/5] remote: don't use remote->{fetch,push}_refspec
Date: Fri, 16 Jun 2017 15:00:51 -0700 [thread overview]
Message-ID: <xmqq60fvwq24.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170616192837.11035-2-szeder.dev@gmail.com> ("SZEDER Gábor"'s message of "Fri, 16 Jun 2017 21:28:33 +0200")
SZEDER Gábor <szeder.dev@gmail.com> 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?
next prev parent reply other threads:[~2017-06-16 22:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 19:28 [RFC/PATCH 0/5] remote: eliminate remote->{fetch,push}_refspec and lazy parsing of refspecs SZEDER Gábor
2017-06-16 19:28 ` [PATCH 1/5] remote: don't use remote->{fetch,push}_refspec SZEDER Gábor
2017-06-16 22:00 ` Junio C Hamano [this message]
2017-06-16 19:28 ` [PATCH 2/5] remote.c: don't pass copies of refspecs to add_{fetch,push}_refspec() SZEDER Gábor
2017-06-16 19:28 ` [PATCH 3/5] remote.c: extract a helper function to parse a single refspec SZEDER Gábor
2017-06-16 19:28 ` [PATCH 4/5] remote.c: eliminate remote->fetch_refspec SZEDER Gábor
2017-06-16 19:28 ` [PATCH 5/5] remote.c: eliminate remote->push_refspec SZEDER Gábor
2017-06-16 21:55 ` [RFC/PATCH 0/5] remote: eliminate remote->{fetch,push}_refspec and lazy parsing of refspecs Junio C Hamano
2017-06-17 12:25 ` SZEDER Gábor
2017-06-17 12:33 ` Jeff King
2017-06-17 11:55 ` Jeff King
2017-06-19 20:07 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq60fvwq24.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).