aboutsummaryrefslogtreecommitdiff
path: root/t/t9807-git-p4-submit.sh
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2012-09-09 16:16:12 -0400
committerJunio C Hamano <gitster@pobox.com>2012-09-16 21:52:52 -0700
commit728b7ad8bb6491d1d8bcd7498e06474b15812d52 (patch)
treebce3d60130fa34cd6789b521fb009f9ddcbe3429 /t/t9807-git-p4-submit.sh
parentef739f0829f866b7e70e072a6744dc9cd1e12822 (diff)
downloadgit-728b7ad8bb6491d1d8bcd7498e06474b15812d52.tar.gz
git-728b7ad8bb6491d1d8bcd7498e06474b15812d52.tar.xz
git p4: add submit --prepare-p4-only option
This option can be used to prepare the client workspace for submission, only. It does not invoke the final "p4 submit". A message describes how to proceed, either submitting the changes or reverting. Signed-off-by: Pete Wyckoff <pw@padd.com> Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9807-git-p4-submit.sh')
-rwxr-xr-xt/t9807-git-p4-submit.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh
index 9cb6aa79e..0ae048f29 100755
--- a/t/t9807-git-p4-submit.sh
+++ b/t/t9807-git-p4-submit.sh
@@ -375,6 +375,30 @@ test_expect_success 'description with Jobs section and bogus following text' '
make_job $(cat jobname) &&
test_must_fail git p4 submit 2>err &&
test_i18ngrep "Unknown field name" err
+ ) &&
+ (
+ cd "$cli" &&
+ p4 revert desc6 &&
+ rm desc6
+ )
+'
+
+test_expect_success 'submit --prepare-p4-only' '
+ test_when_finished cleanup_git &&
+ git p4 clone --dest="$git" //depot &&
+ (
+ cd "$git" &&
+ echo prep-only-add >prep-only-add &&
+ git add prep-only-add &&
+ git commit -m "prep only add" &&
+ git p4 submit --prepare-p4-only >out &&
+ test_i18ngrep "prepared for submission" out &&
+ test_i18ngrep "must be deleted" out
+ ) &&
+ (
+ cd "$cli" &&
+ test_path_is_file prep-only-add &&
+ p4 fstat -T action prep-only-add | grep -w add
)
'