Add a with_lock function to ensure commitnumber appends do not interweave.
[git-central.git] / scripts / gc-push
1 #!/bin/sh
2
3 branch_name=$(git symbolic-ref --quiet HEAD)
4 if [[ $? -ne 0 ]] ; then
5         echo "not on a branch"
6         exit 1
7 fi
8
9 branch_name=${branch_name/refs\/heads\//}
10
11 git push origin $branch_name
12 if [[ $? -ne 0 ]] ; then
13     exit $?
14 fi
15
16 # ...tags...
17