mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user