summaryrefslogtreecommitdiff
path: root/t/t9806-git-p4-options.sh
diff options
context:
space:
mode:
authorLibravatar Pete Wyckoff <pw@padd.com>2012-06-27 08:00:56 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-06-27 21:06:34 -0700
commit08c5eb7ac0167e5932f2456df3dcebd0712d63a9 (patch)
treed24129e9b3be83e7eee0136d8ec578b2fa2e26fd /t/t9806-git-p4-options.sh
parentgit p4 test: use real_path to resolve p4 client symlinks (diff)
downloadtgif-08c5eb7ac0167e5932f2456df3dcebd0712d63a9.tar.xz
git p4 test: simplify quoting involving TRASH_DIRECTORY
For temporary files that are created in the top-level TRASH_DIRECTORY, trust that the tests do not chdir except in subshells, and avoid some quoting. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9806-git-p4-options.sh')
-rwxr-xr-xt/t9806-git-p4-options.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh
index 83738fa2cd..a37c6cbd7c 100755
--- a/t/t9806-git-p4-options.sh
+++ b/t/t9806-git-p4-options.sh
@@ -39,10 +39,9 @@ test_expect_success 'clone --branch' '
'
test_expect_success 'clone --changesfile' '
- cf="$TRASH_DIRECTORY/cf" &&
- test_when_finished "rm \"$cf\"" &&
- printf "1\n3\n" >"$cf" &&
- git p4 clone --changesfile="$cf" --dest="$git" //depot &&
+ test_when_finished "rm cf" &&
+ printf "1\n3\n" >cf &&
+ git p4 clone --changesfile="$TRASH_DIRECTORY/cf" --dest="$git" //depot &&
test_when_finished cleanup_git &&
(
cd "$git" &&
@@ -55,10 +54,9 @@ test_expect_success 'clone --changesfile' '
'
test_expect_success 'clone --changesfile, @all' '
- cf="$TRASH_DIRECTORY/cf" &&
- test_when_finished "rm \"$cf\"" &&
- printf "1\n3\n" >"$cf" &&
- test_must_fail git p4 clone --changesfile="$cf" --dest="$git" //depot@all
+ test_when_finished "rm cf" &&
+ printf "1\n3\n" >cf &&
+ test_must_fail git p4 clone --changesfile="$TRASH_DIRECTORY/cf" --dest="$git" //depot@all
'
# imports both master and p4/master in refs/heads