summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Pete Wyckoff <pw@padd.com>2012-02-25 20:06:24 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-02-26 16:14:20 -0800
commita93d33ee7bf2f1cd41f94470e9e44e0fc9307046 (patch)
tree40346569540ff8ea216edbc0fbed2983c6207068 /t
parentREADME: point to Documentation/SubmittingPatches (diff)
downloadtgif-a93d33ee7bf2f1cd41f94470e9e44e0fc9307046.tar.xz
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')
-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 c9471d562d..25e01a469d 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"