Merge branch 'maint'
[gitweb.git] / git-rebase.sh
index 9cf005677c2936a7c2f14a00cc4e91670e2259f3..1583402a060793c25e49c3446c2a35fe27101883 100755 (executable)
@@ -69,13 +69,10 @@ continue_merge () {
                        die "$RESOLVEMSG"
                fi
                printf "Committed: %0${prec}d " $msgnum
-               git rev-list --pretty=oneline -1 HEAD | \
-                       sed 's/^[a-f0-9]\+ //'
        else
                printf "Already applied: %0${prec}d " $msgnum
-               git rev-list --pretty=oneline -1 "$cmt" | \
-                       sed 's/^[a-f0-9]\+ //'
        fi
+       git rev-list --pretty=oneline -1 "$cmt" | sed -e 's/^[^ ]* //'
 
        prev_head=`git rev-parse HEAD^0`
        # save the resulting commit so we can read-tree on it later
@@ -125,15 +122,14 @@ finish_rb_merge () {
 
 is_interactive () {
        test -f "$dotest"/interactive ||
-       while case $#,"$1" in 0,|*,-i|*,--interactive) break ;; esac
-       do
+       while :; do case $#,"$1" in 0,|*,-i|*,--interactive) break ;; esac
                shift
        done && test -n "$1"
 }
 
 is_interactive "$@" && exec git-rebase--interactive "$@"
 
-while case "$#" in 0) break ;; esac
+while test $# != 0
 do
        case "$1" in
        --continue)
@@ -219,9 +215,11 @@ do
        -v|--verbose)
                verbose=t
                ;;
+       --whitespace=*)
+               git_am_opt="$git_am_opt $1"
+               ;;
        -C*)
-               git_am_opt=$1
-               shift
+               git_am_opt="$git_am_opt $1"
                ;;
        -*)
                usage