Re: [PATCH v2] test: set the realpath of CWD as TRASH_DIRECTORY

2012-08-31 Thread Michael Haggerty
On 08/30/2012 07:26 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> By the way, is the use of realpath(3) permissible in git code? >> GIT_CEILING_DIRECTORIES handling could be fixed relatively easily by >> using this function to canonicalize pathnames before comparison. > > As long as

Re: [PATCH v2] test: set the realpath of CWD as TRASH_DIRECTORY

2012-08-29 Thread Junio C Hamano
Michael Haggerty writes: > By the way, is the use of realpath(3) permissible in git code? > GIT_CEILING_DIRECTORIES handling could be fixed relatively easily by > using this function to canonicalize pathnames before comparison. As long as we can add a compat/realpath.c (perhaps lift one from gli

Re: [PATCH v2] test: set the realpath of CWD as TRASH_DIRECTORY

2012-08-29 Thread Michael Haggerty
On 08/29/2012 06:33 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> On 08/29/2012 08:06 AM, Junio C Hamano wrote: >>> Michael Haggerty writes: >> >> It is in fact the whole approach that I object to. >> ... >>> What exactly is broken in CEILING? >> >> CEILING is used in setup_git_direc

Re: [PATCH v2] test: set the realpath of CWD as TRASH_DIRECTORY

2012-08-29 Thread Junio C Hamano
Michael Haggerty writes: > On 08/29/2012 08:06 AM, Junio C Hamano wrote: >> Michael Haggerty writes: > > It is in fact the whole approach that I object to. > ... >> What exactly is broken in CEILING? > > CEILING is used in setup_git_directory_gently_1() when trying to find > the GIT_DIR appropri

Re: [PATCH v2] test: set the realpath of CWD as TRASH_DIRECTORY

2012-08-29 Thread Michael Haggerty
On 08/29/2012 08:06 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> But it also changes almost 600 *other* tests from "succeed even in the >> presence of symlinks" to "never tested in the presence of symlinks", and >> I think that is surrendering more ground than necessary. > > Ouch.

Re: [PATCH v2] test: set the realpath of CWD as TRASH_DIRECTORY

2012-08-28 Thread Junio C Hamano
Michael Haggerty writes: > But it also changes almost 600 *other* tests from "succeed even in the > presence of symlinks" to "never tested in the presence of symlinks", and > I think that is surrendering more ground than necessary. Ouch. I did not know have 600+ tests that cares about CEILING.

Re: [PATCH v2] test: set the realpath of CWD as TRASH_DIRECTORY

2012-08-28 Thread Michael Haggerty
On 08/27/2012 06:15 PM, Junio C Hamano wrote: > Jiang Xin writes: > >> Some testcases will fail if current work directory is on a symlink. >> >> symlink$ sh ./t4035-diff-quiet.sh >> $ sh ./t4035-diff-quiet.sh --root=/symlink >> $ TEST_OUTPUT_DIRECTORY=/symlink sh ./t4035-diff-quiet.sh

Re: [PATCH v2] test: set the realpath of CWD as TRASH_DIRECTORY

2012-08-27 Thread Junio C Hamano
Jiang Xin writes: > Some testcases will fail if current work directory is on a symlink. > > symlink$ sh ./t4035-diff-quiet.sh > $ sh ./t4035-diff-quiet.sh --root=/symlink > $ TEST_OUTPUT_DIRECTORY=/symlink sh ./t4035-diff-quiet.sh > > This is because the realpath of ".git" directory w