From a93d33ee7bf2f1cd41f94470e9e44e0fc9307046 Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Sat, 25 Feb 2012 20:06:24 -0500 Subject: 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 Signed-off-by: Junio C Hamano --- t/t9809-git-p4-client-view.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 't') 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 @@ -240,6 +240,23 @@ test_expect_success 'quotes on rhs only' ' git_verify "cdir 1/file11" "cdir 1/file12" ' +# +# 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 -- cgit v1.2.3