blob: 573b77805e0fe16a8ecae3b5482d89b28a9d0acd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
|