From: Junio C Hamano Date: Wed, 11 Mar 2009 20:49:11 +0000 (-0700) Subject: Merge branch 'tv/rebase-stat' X-Git-Tag: v1.6.3-rc0~172 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e43997979ecc69bb9b9720a080a3897738e00f19;p=git.git Merge branch 'tv/rebase-stat' * tv/rebase-stat: git-pull: Allow --stat and --no-stat to be used with --rebase git-rebase: Add --stat and --no-stat for producing diffstat on rebase --- e43997979ecc69bb9b9720a080a3897738e00f19 diff --cc git-rebase.sh index c2a9b1fbe,26d75662f..d38ab0b83 --- a/git-rebase.sh +++ b/git-rebase.sh @@@ -46,9 -46,9 +46,10 @@@ do_merge dotest="$GIT_DIR"/rebase-merge prec=4 verbose= + diffstat=$(git config --bool rebase.stat) git_am_opt= rebase_root= +force_rebase= continue_merge () { test -n "$prev_head" || die "prev_head must be defined" @@@ -429,24 -428,12 +437,17 @@@ if test "$upstream" = "$onto" && test " # linear history? ! (git rev-list --parents "$onto".."$branch" | grep " .* ") > /dev/null then - # Lazily switch to the target branch if needed... - test -z "$switch_to" || git checkout "$switch_to" - echo >&2 "Current branch $branch_name is up to date." - exit 0 + if test -z "$force_rebase" + then + # Lazily switch to the target branch if needed... + test -z "$switch_to" || git checkout "$switch_to" + echo >&2 "Current branch $branch_name is up to date." + exit 0 + else + echo "Current branch $branch_name is up to date, rebase forced." + 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"