summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-26 06:43:59 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-10-26 06:43:59 (GMT)
commitf89ad67fb054bead054bc92b4d0d4d007248b611 (patch)
tree1f70c63f8d7b2e1498a8ef1489b87e4c8ddf69dc
parent271440e3b65f0c599e19fdd6bc07aeccc16699fb (diff)
downloadgit-f89ad67fb054bead054bc92b4d0d4d007248b611.zip
git-f89ad67fb054bead054bc92b4d0d4d007248b611.tar.gz
git-f89ad67fb054bead054bc92b4d0d4d007248b611.tar.bz2
Add [v]iew patch in git-am interactive.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-am.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/git-am.sh b/git-am.sh
index fd0772d..115ebad 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -270,14 +270,17 @@ do
echo "--------------------------"
cat "$dotest/final-commit"
echo "--------------------------"
- echo -n "Apply? [y]es/[n]o/[e]dit/[a]ccept all "
+ echo -n "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
read reply
case "$reply" in
- y*|Y*) action=yes ;;
- a*|A*) action=yes interactive= ;;
- n*|N*) action=skip ;;
- e*|E*) "${VISUAL:-${EDITOR:-vi}}" "$dotest/final-commit"
+ [yY]*) action=yes ;;
+ [aA]*) action=yes interactive= ;;
+ [nN]*) action=skip ;;
+ [eE]*) "${VISUAL:-${EDITOR:-vi}}" "$dotest/final-commit"
action=again ;;
+ [vV]*) action=again
+ LESS=-S ${PAGER:-less} "$dotest/patch" ;;
+ *) action=again ;;
esac
done
else