From 3bff7cd86131f6fd39fa3918bdc2682bbfb74717 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Tue, 17 Jun 2008 14:42:25 +0200 Subject: [PATCH] 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 --- t/t5505-remote.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 0c1cd17388..881efabd2b 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -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)