[PATCH v2 1/3] git-p4: add failing test for submit from detached head

2015-11-21 Thread Luke Diamand
git-p4 can't submit from a detached head. This test case
demonstrates the problem.

Signed-off-by: Luke Diamand 
---
 t/t9800-git-p4-basic.sh | 16 
 1 file changed, 16 insertions(+)

diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh
index 90d41ed..114b19f 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
 '
-- 
2.6.0.rc3.238.gc07a1e8

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/3] git-p4: add failing test for submit from detached head

2015-11-06 Thread Luke Diamand
git-p4 can't submit from a detached head. This test case
demonstrates the problem.

Signed-off-by: Luke Diamand 
---
 t/t9800-git-p4-basic.sh | 16 
 1 file changed, 16 insertions(+)

diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh
index 90d41ed..114b19f 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
 '
-- 
2.6.0.rc3.238.gc07a1e8

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html