diff options
author | Luke Diamand <luke@diamand.org> | 2015-11-21 12:54:39 +0300 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-24 23:20:15 +0300 |
commit | 74b6fe9202792f43ba01014599c8fe183149c0a3 (patch) | |
tree | bc911c6f1527be3ae6b257ace9789b9f58d0fe48 /t | |
parent | 7a2c4af7a82eebf2ed0e60a2b36c31e70c619264 (diff) |
git-p4: add failing test for submit from detached head
git-p4 can't submit from a detached head. This test case
demonstrates the problem.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 't')
-rwxr-xr-x | t/t9800-git-p4-basic.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh index 90d41ed954..114b19fca8 100755 --- a/t/t9800-git-p4-basic.sh +++ b/t/t9800-git-p4-basic.sh @@ -241,6 +241,22 @@ test_expect_success 'unresolvable host in P4PORT should display error' ' ) ' +test_expect_failure 'submit from detached head' ' + test_when_finished cleanup_git && + git p4 clone --dest="$git" //depot && + ( + cd "$git" && + git checkout p4/master && + >detached_head_test && + git add detached_head_test && + git commit -m "add detached_head" && + git config git-p4.skipSubmitEdit true && + git p4 submit && + git p4 rebase && + git log p4/master | grep detached_head + ) +' + test_expect_success 'kill p4d' ' kill_p4d ' |