summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2017-08-01 16:25:42 +0100
committerRichard Maw <richard.maw@gmail.com>2017-08-01 17:03:45 +0100
commitee9bc487e49b20884cb55f86c2c610a8c4ae0279 (patch)
tree94522d329557097429b6cb6d34556c91a8e3c1b0 /testing
parentea45bb9535fceea9c9feebde0360c594fc985fe1 (diff)
downloadgitano-ee9bc487e49b20884cb55f86c2c610a8c4ae0279.tar.gz
Add Yarn for testing dangling HEADrichardmaw/test-warn-dangling-head
Diffstat (limited to 'testing')
-rw-r--r--testing/03-dangling-HEAD.yarn24
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/03-dangling-HEAD.yarn b/testing/03-dangling-HEAD.yarn
new file mode 100644
index 0000000..573b778
--- /dev/null
+++ b/testing/03-dangling-HEAD.yarn
@@ -0,0 +1,24 @@
+Being notified when a push does not fix a dangling HEAD
+-------------------------------------------------------
+
+Things can get confusing quickly when you've got a repository
+where the symbolic ref HEAD does not point to an existing branch.
+This is called a "dangling HEAD".
+
+Since Gitano allows you to change the HEAD symbolic ref from refs/heads/master
+it can be easier to accidentally leave it dangling after pushing a branch.
+
+To reduce the surprise involved, Gitano will provide a warning
+if after a push the HEAD symbolic ref is dangling.
+
+ SCENARIO Pushes resulting in a dangling HEAD are warned about
+
+ GIVEN a standard instance
+ WHEN testinstance adminkey runs create testrepo
+ AND testinstance adminkey runs config testrepo set project.head refs/heads/trunk
+ AND testinstance, using adminkey, clones testrepo as testrepo
+ AND testinstance applies add-a-FOO.patch in testrepo
+ AND testinstance, using adminkey, pushes testrepo to testrepo.git
+ THEN stderr contains WARNING: HEAD remains dangling
+
+ FINALLY the instance is torn down