./all - handle upstream rebase better (abort, instead of causing a frankenstein merge)
authorRudolf Polzer <rpolzer@grawp.(none)>
Sat, 10 Apr 2010 16:05:46 +0000 (18:05 +0200)
committerRudolf Polzer <rpolzer@grawp.(none)>
Sat, 10 Apr 2010 16:05:46 +0000 (18:05 +0200)
all

diff --git a/all b/all
index c94d71b36be26690535cbbf9a8626a25694da14b..f36fdde2eeeceae5f4f5137e37e4b1001f72e655 100755 (executable)
--- a/all
+++ b/all
@@ -153,10 +153,17 @@ case "$cmd" in
                                                fi
                                                ;;
                                esac
-                               if ! verbose git pull; then
-                                       check_mergeconflict "$d"
-                                       # do not exit, as this may also mean we are tracking something else
+                               verbose git config remote.origin.fetch "refs/heads/*:refs/remotes/origin/*"
+
+                               r=`git symbolic-ref HEAD`
+                               r=${r#refs/heads/}
+                               if git config branch.$r.remote >/dev/null 2>&1; then
+                                       if ! verbose git pull; then
+                                               check_mergeconflict "$d"
+                                               exit 1 # FATAL
+                                       fi
                                fi
+
                                cd "$d00"
                                checkself "$cmd" "$@"
                                cd "$d0/$d"