Re: [PATCH 1/2] t1501: avoid bashisms
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> Junio, please don't pick up this patch.
Won't. And [2/2] needs to be updated with something like this?
t/t1501-worktree.sh | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index 1429a65..8cab065 100755
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
@@ -341,14 +341,10 @@ test_expect_success 'make_relative_path handles double slashes in GIT_DIR' '
'
test_expect_success 'relative $GIT_WORK_TREE and git subprocesses' '
- (
- GIT_DIR=repo.git
- GIT_WORK_TREE=repo.git/work
- export GIT_DIR GIT_WORK_TREE
+ GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
test-subprocess rev-parse --show-toplevel >actual &&
- echo "`pwd`/repo.git/work" >expected &&
+ echo "$(pwd)/repo.git/work" >expected &&
test_cmp expected actual
- )
'
test_done