Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes

2012-09-06 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@gmail.com writes: Just an idea. We could unify [a-z]: and //host into dos root concept. That would teach other code paths about UNC paths too. ... diff --git a/path.c b/path.c index 66acd24..0e4e2d7 100644 --- a/path.c +++ b/path.c @@ -498,11 +498,12 @@ const

Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes

2012-09-06 Thread Michael Haggerty
On 09/05/2012 10:40 AM, Johannes Sixt wrote: Am 9/4/2012 10:14, schrieb mhag...@alum.mit.edu: From: Michael Haggerty mhag...@alum.mit.edu These tests already pass, but make sure they don't break in the future. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- It would be great if

Re: [msysGit] Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes

2012-09-06 Thread Nguyen Thai Ngoc Duy
On Fri, Sep 7, 2012 at 12:34 AM, Junio C Hamano gits...@pobox.com wrote: Modulo that I suspect you could get rid of offset_1st_component() altogether and has_dos_drive_prefix() return the length of the d: or //d part (which needs to be copied literally regardless of the normalization), what

Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes

2012-09-05 Thread Johannes Sixt
Am 9/4/2012 10:14, schrieb mhag...@alum.mit.edu: From: Michael Haggerty mhag...@alum.mit.edu These tests already pass, but make sure they don't break in the future. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- It would be great if somebody would check whether these tests

Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes

2012-09-05 Thread Nguyen Thai Ngoc Duy
On Wed, Sep 5, 2012 at 1:19 AM, Junio C Hamano gits...@pobox.com wrote: mhag...@alum.mit.edu writes: From: Michael Haggerty mhag...@alum.mit.edu These tests already pass, but make sure they don't break in the future. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- It would be

Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes

2012-09-05 Thread Nguyen Thai Ngoc Duy
On Wed, Sep 5, 2012 at 6:05 PM, Orgad and Raizel Shaneh org...@gmail.com wrote: This seems to fix it. Just change src[x] == '/' to is_dir_sep(src[x]). So you are able to test the changes. Would you mind submitting a patch so other users benefit it as well? -- Duy -- To unsubscribe from this

Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes

2012-09-05 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@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

[PATCH 7/7] t0000: verify that real_path() removes extra slashes

2012-09-04 Thread mhagger
From: Michael Haggerty mhag...@alum.mit.edu These tests already pass, but make sure they don't break in the future. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- It would be great if somebody would check whether these tests pass on Windows, and if not, give me a tip about how to fix

Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes

2012-09-04 Thread Junio C Hamano
mhag...@alum.mit.edu writes: From: Michael Haggerty mhag...@alum.mit.edu These tests already pass, but make sure they don't break in the future. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- It would be great if somebody would check whether these tests pass on Windows, and if