t5505: fix pwd on Windows again

The earlier commit b74e70b3 set $PWD to the particular 'pwd' form to use
on Windows and *nix platforms. But this is not good for two reasons: $PWD
has a predefined meaning to the shell (it influences pwd itself), and
all occurrences of 'pwd' must be replaced by $PWD. This new fix now simply
replaces 'pwd' by a shell function on Windows only, where we can be
reasonably certain that 'bash' is in use, so that the function can call
the builtin 'pwd' explicitly.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
Johannes Sixt
2008-06-17 14:42:25 +02:00
parent 04008cce95
commit 3bff7cd861

View File

@@ -108,12 +108,11 @@ test_expect_success 'remove remote' '
'
case $(uname -s) in
*MINGW*) PWD="pwd -W";;
*) PWD=pwd;;
*MINGW*) pwd() { builtin pwd -W; } ;;
esac
cat > test/expect << EOF
* remote origin
URL: $($PWD)/one/.git
URL: $(pwd)/one/.git
Remote branch merged with 'git pull' while on branch master
master
New remote branch (next fetch will store in remotes/origin)