Re: [PATCH] Fix expected values of setup tests on Windows

Previous thread: git rebase -i doesn't respect rebase.autosquash by Mike Doherty on Thursday, December 30, 2010 - 4:48 pm. (4 messages)

Next thread: [RFC PATCH 1/3] filter-branch: optionally dump all mappings at the end by Thomas Rast on Friday, December 31, 2010 - 8:29 am. (2 messages)
From: Nguyen Thai Ngoc Duy
Date: Friday, December 31, 2010 - 6:00 am

Hmm.. from test-lib.sh:

TEST_DIRECTORY=$(pwd)
test="trash directory.$(basename "$0" .sh)"
TRASH_DIRECTORY="$TEST_DIRECTORY/$test"

I'm just curious how these lines make $TRASH_DIRECTORY in POSIX format, while

here=$(pwd)

in your patch does not. Does bash auto convert value in
TRASH_DIRECTORY="$TE..." line?
-- 
Duy
--

From: Johannes Sixt
Date: Friday, December 31, 2010 - 9:11 am

No. When this line is executed:

TEST_DIRECTORY=$(pwd)

$(pwd) still has its default behavior to return the POSIX style path. pwd is 
redefined to pwd -W only later.

I'm hesitant to redefine pwd earlier in test-lib.sh, though, because we would 
have to audit all uses of TEST_DIRECTORY for whether POSIX style paths or 
drive-letter paths are needed.

-- Hannes
--

From: Jonathan Nieder
Date: Friday, December 31, 2010 - 1:30 pm

Would it make sense to change it to

 TEST_DIRECTORY=$PWD

for clarity and robustness against code movement, then?
--

From: Johannes Sixt
Date: Friday, December 31, 2010 - 3:21 pm

Yes, that would make sense.

-- Hannes

--

From: Junio C Hamano
Date: Saturday, January 1, 2011 - 6:31 pm

It will be very much appreciated to add a few sentences to clarify this to
"Do's and don'ts" section of t/README if you are re-rolling this.  Thanks.
--

From: Nguyen Thai Ngoc Duy
Date: Friday, December 31, 2010 - 8:46 pm

Ah I missed that. Thanks. Ack from me.
-- 
Duy
--

Previous thread: git rebase -i doesn't respect rebase.autosquash by Mike Doherty on Thursday, December 30, 2010 - 4:48 pm. (4 messages)

Next thread: [RFC PATCH 1/3] filter-branch: optionally dump all mappings at the end by Thomas Rast on Friday, December 31, 2010 - 8:29 am. (2 messages)