]> git.droids-corp.org - git-central.git/blobdiff - scripts/gc-pull
Fix post-receive-email test for USER_EMAIL variable.
[git-central.git] / scripts / gc-pull
index 325eb2dfbcce2525896115dd6d6d8d0c13aa64d9..c2313babc77ac52a7e497c1ef902d9c24af335e2 100644 (file)
@@ -1,4 +1,17 @@
 #!/bin/sh
 
-git pull --rebase
+branch_name=$(git symbolic-ref --quiet HEAD)
+if [[ $? -ne 0 ]] ; then
+       echo "not on a branch"
+       exit 1
+fi
+
+branch_name=${branch_name/refs\/heads\//}
+
+git fetch
+if [[ $? -ne 0 ]] ; then
+       exit $?
+fi
+
+GIT_EDITOR=: git rebase -p -i "origin/$branch_name"