X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-am.sh;h=115ebaddf595f49059208ac890308b6ebe01aa42;hb=9e48b389990c0201487e58f3bac32734a59a7e89;hp=fd0772d900211557200c542b882ead04842f6628;hpb=271440e3b65f0c599e19fdd6bc07aeccc16699fb;p=git.git diff --git a/git-am.sh b/git-am.sh index fd0772d9..115ebadd 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