X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-rebase.sh;h=0ade6992289a807a268ad887d8a71ba54a87cf49;hb=3fcee259d023087184c63eedf1015be6e23ea6e1;hp=c2a9b1fbe05499af32d25750498b244bc0597592;hpb=458eaf5bf895c2df8e0ef81a4c9606d179082e68;p=git.git diff --git a/git-rebase.sh b/git-rebase.sh index c2a9b1fbe..0ade69922 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -46,6 +46,7 @@ do_merge= dotest="$GIT_DIR"/rebase-merge prec=4 verbose= +diffstat=$(git config --bool rebase.stat) git_am_opt= rebase_root= force_rebase= @@ -290,8 +291,15 @@ do esac do_merge=t ;; + -n|--no-stat) + diffstat= + ;; + --stat) + diffstat=t + ;; -v|--verbose) verbose=t + diffstat=t ;; --whitespace=*) git_am_opt="$git_am_opt $1" @@ -301,6 +309,10 @@ do ;; esac ;; + --committer-date-is-author-date|--ignore-date) + git_am_opt="$git_am_opt $1" + force_rebase=t + ;; -C*) git_am_opt="$git_am_opt $1" ;; @@ -440,18 +452,21 @@ then fi fi -if test -n "$verbose" -then - echo "Changes from $mb to $onto:" - # We want color (if set), but no pager - GIT_PAGER='' git diff --stat --summary "$mb" "$onto" -fi - # Detach HEAD and reset the tree echo "First, rewinding head to replay your work on top of it..." git checkout -q "$onto^0" || die "could not detach HEAD" git update-ref ORIG_HEAD $branch +if test -n "$diffstat" +then + if test -n "$verbose" + then + echo "Changes from $mb to $onto:" + fi + # We want color (if set), but no pager + GIT_PAGER='' git diff --stat --summary "$mb" "$onto" +fi + # If the $onto is a proper descendant of the tip of the branch, then # we just fast forwarded. if test "$mb" = "$branch"