diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | testing/03-dangling-HEAD.yarn | 24 |
2 files changed, 26 insertions, 1 deletions
@@ -39,7 +39,8 @@ TESTS := 01-basics 01-hooks 02-commands-as 02-commands-config 02-commands-copy 02-commands-keyring \ 02-commands-ls 02-commands-rename 02-commands-rsync \ 02-commands-sshkey 02-commands-user 02-commands-whoami 03-cgit-support \ - 03-shallow-push 03-treedelta-rules 03-force-pushing + 03-shallow-push 03-treedelta-rules 03-force-pushing \ + 03-dangling-HEAD MODS := gitano \ 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 |