From: Junio C Hamano <gitster@pobox.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: mhagger@alum.mit.edu, Johannes Sixt <j6t@kdbg.org>,
git@vger.kernel.org, Orgad and Raizel Shaneh <orgads@gmail.com>,
msysGit <msysgit@googlegroups.com>
Subject: Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes
Date: Wed, 05 Sep 2012 20:23:58 -0700 [thread overview]
Message-ID: <7v1uif7s1d.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CACsJy8DAbp1uDsNFFk1g9tuEV1qMnM2DZtxOwp5H9_VE7VwO1g@mail.gmail.com> (Nguyen Thai Ngoc Duy's message of "Wed, 5 Sep 2012 17:52:10 +0700")
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> diff --git a/path.c b/path.c
> index 66acd24..ad2881c 100644
> --- a/path.c
> +++ b/path.c
> @@ -503,6 +503,10 @@ int normalize_path_copy(char *dst, const char *src)
> *dst++ = *src++;
> *dst++ = *src++;
> }
> +#ifdef WIN32
> + else if (src[0] == '/' && src[1] == '/')
> + *dst++ = *src++;
> +#endif
The two-byte copy we see above the context is conditional on a nice
abstraction "has_dos_drive_prefix()" so that we do not have to
suffer from these ugly ifdefs. Could we do something similar?
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
next prev parent reply other threads:[~2012-09-06 3:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 8:14 [PATCH 0/7] Fix some bugs in abspath.c mhagger
2012-09-04 8:14 ` [PATCH 1/7] t0000: verify that absolute_path() fails if passed the empty string mhagger
2012-09-04 8:14 ` [PATCH 2/7] absolute_path(): reject " mhagger
2012-09-04 8:14 ` [PATCH 3/7] t0000: verify that real_path() fails if passed " mhagger
2012-09-04 8:14 ` [PATCH 4/7] real_path(): reject " mhagger
2012-09-04 8:14 ` [PATCH 5/7] t0000: verify that real_path() works correctly with absolute paths mhagger
2012-09-05 8:40 ` Johannes Sixt
2012-09-06 21:11 ` Michael Haggerty
2012-09-06 23:08 ` Junio C Hamano
2012-09-09 4:31 ` Michael Haggerty
2012-09-09 4:50 ` Junio C Hamano
2012-09-09 5:27 ` Junio C Hamano
2012-09-04 8:14 ` [PATCH 6/7] real_path(): properly handle nonexistent top-level paths mhagger
2012-09-04 8:14 ` [PATCH 7/7] t0000: verify that real_path() removes extra slashes mhagger
2012-09-04 18:19 ` Junio C Hamano
2012-09-05 10:52 ` Nguyen Thai Ngoc Duy
[not found] ` <CAGHpTB+LipLt3CgVt5O0s9xj5HHf9Y5z9QWEy+FKYH8s4O7Q2w@mail.gmail.com>
2012-09-05 11:13 ` Nguyen Thai Ngoc Duy
2012-09-06 3:23 ` Junio C Hamano [this message]
2012-09-06 5:44 ` Nguyen Thai Ngoc Duy
2012-09-06 17:34 ` Junio C Hamano
2012-09-07 1:18 ` Nguyen Thai Ngoc Duy
2012-09-05 8:40 ` Johannes Sixt
2012-09-06 22:30 ` Michael Haggerty
2012-09-04 18:08 ` [PATCH 0/7] Fix some bugs in abspath.c Junio C Hamano
2012-09-04 19:03 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v1uif7s1d.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=mhagger@alum.mit.edu \
--cc=msysgit@googlegroups.com \
--cc=orgads@gmail.com \
--cc=pclouds@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).