3 # The hook is given three parameters: the ref of the previous HEAD, the ref of
4 # the new HEAD (which may or may not have changed), and a flag indicating
5 # whether the checkout was a branch checkout (changing branches, flag=1) or a
6 # file checkout (retrieving a file from the index, flag=0).
8 branch=$(git symbolic-ref --quiet HEAD)
13 branch=${branch/refs\/heads\//}
14 git config --list | grep "branch.${branch}.rebase" > /dev/null
15 if [ $? -ne 0 ] ; then
16 git config --add "branch.${branch}.rebase" true