3 # Rebuild "pu" from topic branches.
6 git-update-index
--refresh ||
exit
7 case "$(git-diff-index --name-status HEAD)" in
9 *) echo 2>&1 "Local modifications exist."
13 git
reset --hard master
&&
14 ORIG_HEAD
=`git rev-parse ORIG_HEAD` ||
exit
22 HH
=`cd .git/refs/heads && find -type f |
24 -e '/^naster$/d' -e '/^master$/d' -e '/^maint$/d' -e '/^pu$/d'`
32 HSHA1
=`git-rev-parse --verify $H` ||
continue
33 MB
=`git-show-branch --merge-base pu $HSHA1`
35 *"$LF$HSHA1$LF"*) continue ;; # already merged.
47 echo -n "Merge which ones (0 to finish)? "
68 USED
=`expr "$USED" : ',\(.*\)'`
69 git pull
-n .
$USE ||
exit
70 # git merge -n "Merge $USED" pu $USE || exit
79 # (IFS=",$IFS"; git merge -n "Merge $H" pu $H) || exit
80 (IFS
=",$IFS"; git pull
-n .
$H) ||
exit
83 (IFS
=",$IFS"; git show-branch master $
* pu
`git rev-parse --short $ORIG_HEAD`)