4 # $2 = new hash (could be the same)
5 # $3 = flag (0=retreiving from index, 1=new checkout)
7 branch=$(git symbolic-ref --quiet HEAD)
8 if [[ $? -ne 0 ]] ; then
12 branch=${branch/refs\/heads\//}
14 rebase=$(git config "branch.${branch}.rebase")
15 if [ $? -ne 0 ] ; then
16 git config "branch.${branch}.rebase" "true"
19 merge=$(git config "branch.${branch}.merge")
20 remote=$(git config "branch.${branch}.remote")
21 if [ "$branch" != "stable" -a "$remote" == "origin" -a "$merge" == "refs/heads/stable" ] ; then
22 git config "branch.${branch}.merge" "refs/heads/${branch}"