3 test_description='client checkout auto-set branch rebase=true'
7 test_expect_success 'setup' '
10 git commit -m "setup" &&
11 git clone . ./server &&
12 git remote add origin ./server &&
13 git config branch.master.remote origin &&
14 git config branch.master.merge refs/heads/master
17 # setup the post-checkout hook
18 install_post_checkout_hook 'post-checkout-rebase'
20 test_expect_success 'sets rebase on new topic branch' '
21 ! git config --list | grep branch.master.rebase &&
22 git checkout -b topic master &&
23 git config --list | grep branch.topic.rebase=true
26 test_expect_success 'checking out remote branch does nothing' '
27 git push origin topic:topic2 &&
29 git checkout origin/topic2 &&
30 ! git config --list | grep "branch..rebase"
33 test_expect_success 'cloning stable sets up the correct merge' '
34 git push origin topic:stable &&
36 git checkout -b topic3 origin/stable &&
37 test "refs/heads/topic3" = "$(git config branch.topic3.merge)"