summaryrefslogtreecommitdiff
path: root/t/t9809-git-p4-client-view.sh
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2012-02-26 01:06:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-02-27 00:14:20 (GMT)
commita93d33ee7bf2f1cd41f94470e9e44e0fc9307046 (patch)
tree40346569540ff8ea216edbc0fbed2983c6207068 /t/t9809-git-p4-client-view.sh
parent07f050c9996cbda2af8d42996ebd349dcdb4c28d (diff)
downloadgit-a93d33ee7bf2f1cd41f94470e9e44e0fc9307046.zip
git-a93d33ee7bf2f1cd41f94470e9e44e0fc9307046.tar.gz
git-a93d33ee7bf2f1cd41f94470e9e44e0fc9307046.tar.bz2
git-p4: set useClientSpec variable on initial clone
If --use-client-spec was given, set the matching configuration variable. This is necessary to ensure that future submits work properly. The alternatives of requiring the user to set it, or providing a command-line option on every submit, are error prone. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9809-git-p4-client-view.sh')
-rwxr-xr-xt/t9809-git-p4-client-view.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh
index c9471d5..25e01a4 100755
--- a/t/t9809-git-p4-client-view.sh
+++ b/t/t9809-git-p4-client-view.sh
@@ -241,6 +241,23 @@ test_expect_success 'quotes on rhs only' '
'
#
+# Submit tests
+#
+
+# clone sets variable
+test_expect_success 'clone --use-client-spec sets useClientSpec' '
+ client_view "//depot/... //client/..." &&
+ test_when_finished cleanup_git &&
+ "$GITP4" clone --use-client-spec --dest="$git" //depot &&
+ (
+ cd "$git" &&
+ git config --bool git-p4.useClientSpec >actual &&
+ echo true >true &&
+ test_cmp actual true
+ )
+'
+
+#
# Rename directories to test quoting in depot-side mappings
# //depot
# - "dir 1"