Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-08-20 Thread Michael Haggerty
On 08/19/2012 06:43 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> I just verified that the combination of your two suggestions (i.e., the >> patch below) fixes the problem for me. > > Good to know. > > The only remaining two worries from me are if everybody has working > pwd at that

Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-08-19 Thread Junio C Hamano
Michael Haggerty writes: > I just verified that the combination of your two suggestions (i.e., the > patch below) fixes the problem for me. Good to know. The only remaining two worries from me are if everybody has working pwd at that early point in the script (I think MINGW replaces pwd with it

Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-08-19 Thread Michael Haggerty
On 08/18/2012 10:36 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> I can work around the problem by using "--root=/run/shm". > > I do not necessarily think it is a work around. http://en.wiktionary.org/wiki/workaround: 2. (computing) A procedure or a temporary fix that bypasses a pr

Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-08-18 Thread Junio C Hamano
Michael Haggerty writes: > I can work around the problem by using "--root=/run/shm". I do not necessarily think it is a work around. A low-impact approach may be to update the part that parses --root option to do root=$(...) root=$( cd "$root" && /bin/pwd ) or something. -- T

Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-08-18 Thread Michael Haggerty
Junio C Hamano pobox.com> writes: > > Jiang Xin gmail.com> writes: > > > Run command 'git rev-parse --git-dir' under subdir will return realpath > > of '.git' directory. Some test scripts compare this realpath against > > "$TRASH_DIRECTORY", they are not equal if current working directory is >

Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-07-24 Thread Jiang Xin
2012/7/24 Junio C Hamano : > I wonder if running test in a real directory (in other words, "fix" > your cwd) may be a simpler, more robust and generally a better > solution, e.g. something silly like... > > diff --git a/t/test-lib.sh b/t/test-lib.sh > index acda33d..7f6fb0a 100644 > --- a/t/test-li

Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-07-24 Thread Junio C Hamano
Jiang Xin writes: > Run command 'git rev-parse --git-dir' under subdir will return realpath > of '.git' directory. Some test scripts compare this realpath against > "$TRASH_DIRECTORY", they are not equal if current working directory is > on a symlink. > > In this fix, get realpath of "$TRASH_DIRE

Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-07-24 Thread Pete Wyckoff
worldhello@gmail.com wrote on Tue, 24 Jul 2012 16:00 +0800: > Run command 'git rev-parse --git-dir' under subdir will return realpath > of '.git' directory. Some test scripts compare this realpath against > "$TRASH_DIRECTORY", they are not equal if current working directory is > on a symlink. >

Re: [PATCH] test: some testcases failed if cwd is on a symlink

2012-07-24 Thread Stefano Lattarini
Some grammatical nits about the commit message. I hope this doesn't come across as too picky/annoying ... And you might want to wait for a native to confirm whether these nits are actually all warranted. On 07/24/2012 10:00 AM, Jiang Xin wrote: > Run > s/Run/Running/ > command 'git rev-parse --

[PATCH] test: some testcases failed if cwd is on a symlink

2012-07-24 Thread Jiang Xin
Run command 'git rev-parse --git-dir' under subdir will return realpath of '.git' directory. Some test scripts compare this realpath against "$TRASH_DIRECTORY", they are not equal if current working directory is on a symlink. In this fix, get realpath of "$TRASH_DIRECTORY", store it in "$TRASH_REA