t5510: Do not use $(pwd) when fetching / pushing / pulling via rsync
On MINGW, "pwd" is defined as "pwd -W" in test-lib.sh. This usually is the right thing, but the absolute Windows path with a colon confuses rsync. We could use $PWD in this case to work around the issue, but in fact there is no need to use an absolute path in the first place, so get rid of it. This was discovered in the context of the mingwGitDevEnv project and only did not surface before with msysgit because the latter does not ship rsync. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sebastian Schuberth committed
Mar 19, 2014 at 20:43 UTC
ab58289eff9d305a8f911c8b7bd5b4e84a693563
1 file changed
+3
-3
t/t5510-fetch.sh
+3
-3
@@ -301,7 +301,7 @@ test_expect_success 'fetch via rsync' '
301
mkdir rsynced &&
302
(cd rsynced &&
303
git init --bare &&
304
- git fetch "rsync:$(pwd)/../.git" master:refs/heads/master &&
304
+ git fetch "rsync:../.git" master:refs/heads/master &&
305
git gc --prune &&
306
test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
307
git fsck --full)
@@ -312,7 +312,7 @@ test_expect_success 'push via rsync' '
312
(cd rsynced2 &&
313
git init) &&
314
(cd rsynced &&
315
- git push "rsync:$(pwd)/../rsynced2/.git" master) &&
315
+ git push "rsync:../rsynced2/.git" master) &&
316
(cd rsynced2 &&
317
git gc --prune &&
318
test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
@@ -323,7 +323,7 @@ test_expect_success 'push via rsync' '
323
mkdir rsynced3 &&
324
(cd rsynced3 &&
325
git init) &&
326
- git push --all "rsync:$(pwd)/rsynced3/.git" &&
326
+ git push --all "rsync:rsynced3/.git" &&
327
(cd rsynced3 &&
328
test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
329
git fsck --full)