Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit ab58289

Browse files
sschuberthgitster
authored andcommitted
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 <[email protected]> Acked-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5f95c9f commit ab58289

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t5510-fetch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ test_expect_success 'fetch via rsync' '
301301
mkdir rsynced &&
302302
(cd rsynced &&
303303
git init --bare &&
304-
git fetch "rsync:$(pwd)/../.git" master:refs/heads/master &&
304+
git fetch "rsync:../.git" master:refs/heads/master &&
305305
git gc --prune &&
306306
test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
307307
git fsck --full)
@@ -312,7 +312,7 @@ test_expect_success 'push via rsync' '
312312
(cd rsynced2 &&
313313
git init) &&
314314
(cd rsynced &&
315-
git push "rsync:$(pwd)/../rsynced2/.git" master) &&
315+
git push "rsync:../rsynced2/.git" master) &&
316316
(cd rsynced2 &&
317317
git gc --prune &&
318318
test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
@@ -323,7 +323,7 @@ test_expect_success 'push via rsync' '
323323
mkdir rsynced3 &&
324324
(cd rsynced3 &&
325325
git init) &&
326-
git push --all "rsync:$(pwd)/rsynced3/.git" &&
326+
git push --all "rsync:rsynced3/.git" &&
327327
(cd rsynced3 &&
328328
test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
329329
git fsck --full)

0 commit comments

Comments
 (0)