From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <johannes.sixt@telecom.at>
Cc: git@vger.kernel.org, Daniel Barkalow <barkalow@iabervon.org>
Subject: Re: [PATCH] builtin-clone: Use is_dir_sep() instead of '/'
Date: Fri, 18 Jul 2008 17:32:26 -0700 [thread overview]
Message-ID: <7vk5fi67dx.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 1216366485-12201-3-git-send-email-johannes.sixt@telecom.at
Johannes Sixt <johannes.sixt@telecom.at> writes:
> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
> ---
> builtin-clone.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/builtin-clone.c b/builtin-clone.c
> index 643c7d4..fddf47f 100644
> --- a/builtin-clone.c
> +++ b/builtin-clone.c
> @@ -115,7 +115,7 @@ static char *guess_dir_name(const char *repo, int is_bundle)
> if (!after_slash_or_colon)
> end = p;
> p += 7;
> - } else if (*p == '/' || *p == ':') {
> + } else if (is_dir_sep(*p) || *p == ':') {
> if (end == limit)
> end = p;
> after_slash_or_colon = 1;
Ok, but the surrounding code in this function look very suspicious.
* The variable "prefix" is actually about suffix.
* "else if" for explicit ".bundle" case look redundant; it would never
trigger, I suspect.
* Values used to increment p for "prefix" case and ".bundle" case are
inconsistent. I think the redundant one increments by the right value
(i.e. strlen(prefix)-1 is bogus).
next prev parent reply other threads:[~2008-07-19 0:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 7:34 [PATCH] Windows related patches Johannes Sixt
2008-07-18 7:34 ` [PATCH] Teach lookup_prog not to select directories Johannes Sixt
2008-07-18 7:34 ` [PATCH] builtin-clone: Use is_dir_sep() instead of '/' Johannes Sixt
2008-07-18 7:34 ` [PATCH] Add ANSI control code emulation for the Windows console Johannes Sixt
2008-07-18 7:34 ` [PATCH] Windows: set gitexecdir = $(bindir) Johannes Sixt
2008-07-19 0:32 ` Junio C Hamano
2008-07-19 8:52 ` Johannes Sixt
2008-07-19 17:10 ` Steffen Prohaska
2008-07-19 17:28 ` Junio C Hamano
2008-07-19 19:31 ` Johannes Sixt
2008-07-19 0:32 ` Junio C Hamano [this message]
2008-07-19 9:32 ` [PATCH] builtin-clone: Use is_dir_sep() instead of '/' Johannes Sixt
2008-07-19 11:35 ` Johannes Schindelin
2008-07-19 13:49 ` Johannes Sixt
2008-07-19 17:44 ` Daniel Barkalow
2008-07-21 13:43 ` Kristian Høgsberg
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=7vk5fi67dx.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=johannes.sixt@telecom.at \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.