From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Sverre Rabbelier <srabbelier@gmail.com>
Subject: Re: [PATCH 4/7] Allow programs to not depend on remotes having urls
Date: Wed, 27 May 2009 20:42:57 +0200 [thread overview]
Message-ID: <36ca99e90905271142q577f026bidffa1ae89714d2a5@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.0905271408380.2147@iabervon.org>
Daniel,
I found a small typo.
Bert
On Wed, May 27, 2009 at 20:15, Daniel Barkalow <barkalow@iabervon.org> wrote:
> For fetch and ls-remote, which use the first url of a remote, have
> transport_get() determine this by passing a remote and passing NULL
> for the url. For push, which uses every url of a remote, use each url
> in turn if there are any, and use NULL if there are none.
>
> This will allow the transport code to do something different if the
> location is not specified with a url.
>
> Also, have the message for a fetch say "foreign" if there is no url.
>
> Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
> ---
> builtin-fetch.c | 19 +++++++++++------
> builtin-ls-remote.c | 4 +-
> builtin-push.c | 54 +++++++++++++++++++++++++++++++++-----------------
> transport.c | 3 ++
> 4 files changed, 52 insertions(+), 28 deletions(-)
>
> diff --git a/builtin-fetch.c b/builtin-fetch.c
> index 77acabf..bb1534a 100644
> --- a/builtin-fetch.c
> +++ b/builtin-fetch.c
> @@ -341,12 +341,17 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
> what = rm->name;
> }
>
> - url_len = strlen(url);
> - for (i = url_len - 1; url[i] == '/' && 0 <= i; i--)
> - ;
> - url_len = i + 1;
> - if (4 < i && !strncmp(".git", url + i - 3, 4))
> - url_len = i - 3;
> + if (url) {
> + url_len = strlen(url);
> + for (i = url_len - 1; url[i] == '/' && 0 <= i; i--)
> + ;
> + url_len = i + 1;
> + if (4 < i && !strncmp(".git", url + i - 3, 4))
> + url_len = i - 3;
> + } else {
> + url = "foriegn";
Typo.
prev parent reply other threads:[~2009-05-27 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 18:15 [PATCH 4/7] Allow programs to not depend on remotes having urls Daniel Barkalow
2009-05-27 18:42 ` Bert Wesarg [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36ca99e90905271142q577f026bidffa1ae89714d2a5@mail.gmail.com \
--to=bert.wesarg@googlemail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=srabbelier@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.
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 NNTP newsgroup(s).