Automate the release procedure a bit more.
[git.git] / PU
diff --git a/PU b/PU
index 7af28ac..4b4be2b 100755 (executable)
--- a/PU
+++ b/PU
@@ -9,8 +9,15 @@ case "$(git-diff-index --name-status HEAD)" in
 *)     echo 2>&1 "Local modifications exist."
        exit 1;;
 esac
-git checkout pu &&
-git reset --hard master &&
+
+case "$1" in
+--continue)
+       shift
+       ;;
+*)
+       git checkout pu &&
+       git reset --hard master || exit
+esac
 ORIG_HEAD=`git rev-parse ORIG_HEAD` || exit
 LF='
 '
@@ -51,21 +58,23 @@ case "$#" in
                        break ;;
                esac
                I=0
-               UNUSE=
-               USE=
+               UNUSE= USE= USED=
                for H in $HH
                do
                        I=$(($I+1))
                        case " $ans " in
                        *' '$I' '*)
                                USE="$USE$H "
+                               USED="$USED,$H"
                                ;;
                        *)
                                UNUSE="$UNUSE$H "
                                ;;
                        esac
                done
+               USED=`expr "$USED" : ',\(.*\)'`
                git pull -n . $USE || exit
+               # git merge -n "Merge $USED" pu $USE || exit
                HH=$UNUSE
        done
        exit
@@ -74,7 +83,8 @@ esac
 
 for H
 do
+#      (IFS=",$IFS"; git merge -n "Merge $H" pu $H) || exit
        (IFS=",$IFS"; git pull -n . $H) || exit
 done
 
-(IFS=",$IFS"; git show-branch master pu $* $ORIG_HEAD)
+(IFS=",$IFS"; git show-branch master $* pu `git rev-parse --short $ORIG_HEAD`)