3 test_description='sanity check of commands listed in GitNotes'
7 test_expect_success 'setup' '
11 git clone ./. server &&
12 git remote add origin ./server &&
13 rm -fr server/.git/hooks
15 git checkout -b stable &&
16 git push origin stable &&
17 git config --add branch.stable.remote origin &&
18 git config --add branch.stable.merge refs/heads/stable
21 test_expect_success 'make a new local/remote branch' '
23 git checkout -b hotfix2 origin/stable &&
24 git push origin hotfix2 &&
26 # Initially we are still setup to pull from stable
27 git config --list | grep branch.hotfix2.merge=refs/heads/stable &&
28 git config --replace-all branch.hotfix2.merge refs/heads/hotfix2 &&
30 # But we want to pull from the new hotfix2 instead
31 git config --list | grep branch.hotfix2.merge=refs/heads/hotfix2
34 test_expect_success 'make a new local branch' '
35 # Remove the old hotfix2 local branch
36 git checkout origin/hotfix2 &&
37 git branch -d hotfix2 &&
39 # Now back to the real commands
41 git checkout -b hotfix2 origin/hotfix2