From cc50d69a202a4d984d217a5c36323a4547d493f1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 14 Nov 2005 01:04:57 -0800 Subject: [PATCH 1/1] interactive PU building. Signed-off-by: Junio C Hamano --- PU | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/PU b/PU index 856b582b..30cb5753 100755 --- a/PU +++ b/PU @@ -8,13 +8,53 @@ git checkout pu && git reset --hard master && ORIG_HEAD=`git rev-parse ORIG_HEAD` || exit +case "$#" in +0) + # interactive ;-) + shift + HH=`cd .git/refs/heads && find -type f | + sed -e 's/^\.\///' -e '/^master$/d' -e '/^maint$/d' -e '/^pu$/d'` + while test "$HH" + do + I=0 + echo "0: done" + for H in $HH + do + I=$(($I+1)) + echo -n "$I: " + git-show-branch $H + done + echo -n "Merge which ones (0 to finish)? " + read ans + case "$ans" in + '' | 0) + break ;; + esac + I=0 + UNUSE= + USE= + for H in $HH + do + I=$(($I+1)) + case " $ans " in + *' '$I' '*) + USE="$USE$H " + ;; + *) + UNUSE="$UNUSE$H " + ;; + esac + done + git pull -n . $USE || exit + HH=$UNUSE + done + exit + ;; +esac + for H do (IFS=",$IFS"; git pull -n . $H) || exit done (IFS=",$IFS"; git show-branch master pu $* $ORIG_HEAD) - - - - -- 2.11.0