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."
19 git
reset --hard master ||
exit
21 ORIG_HEAD
=`git rev-parse ORIG_HEAD` ||
exit
29 HH
=`cd .git/refs/heads && find -type f |
31 -e '/^naster$/d' -e '/^master$/d' -e '/^maint$/d' -e '/^pu$/d'`
39 HSHA1
=`git-rev-parse --verify $H` ||
continue
40 MB
=`git-show-branch --merge-base pu $HSHA1`
42 *"$LF$HSHA1$LF"*) continue ;; # already merged.
54 echo -n "Merge which ones (0 to finish)? "
75 USED
=`expr "$USED" : ',\(.*\)'`
76 git pull
-n .
$USE ||
exit
77 # git merge -n "Merge $USED" pu $USE || exit
86 # (IFS=",$IFS"; git merge -n "Merge $H" pu $H) || exit
87 (IFS
=",$IFS"; git pull
-n .
$H) ||
exit
90 (IFS
=",$IFS"; git show-branch master $
* pu
`git rev-parse --short $ORIG_HEAD`)