3 test_description
='verify hook support for bare branches'
9 # makes sure tg_test_setup_topgit will work on non-bin-wrappers testees
10 PATH
="${TG_TEST_FULL_PATH%/*}:$PATH" && export PATH
12 test_expect_success
'setup' '
13 tg_test_setup_topgit &&
15 tg_test_create_branch tgb ::master &&
16 test_tick && test_when_finished test_tick=$test_tick &&
20 test_expect_success
'new bare commit allowed' '
21 test_commit "commit on already bare branch should work" xyz
24 test_expect_success
'setup tag' '
28 test_expect_success
'bare forbids adding .topdeps' '
29 git reset --hard start &&
30 echo master >.topdeps &&
32 test_must_fail git commit -m "add .topdeps"
35 test_expect_success
'bare forbids adding .topmsg' '
36 git reset --hard start &&
39 test_must_fail git commit -m "add .topmsg"
42 test_expect_success
'bare allows adding .topdeps & .topmsg' '
43 git reset --hard start &&
46 echo master >.topdeps &&
48 git commit -m "add .topdeps & .topmsg"