author | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 Mar 2009 20:49:11 +0000 (13:49 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 Mar 2009 20:49:11 +0000 (13:49 -0700) |
* 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
git-pull: Allow --stat and --no-stat to be used with --rebase
git-rebase: Add --stat and --no-stat for producing diffstat on rebase
1 | 2 | |||
---|---|---|---|---|
Documentation/config.txt | patch | | diff1 | | diff2 | | blob | history |
git-rebase.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/config.txt
Simple merge
diff --cc git-rebase.sh
index c2a9b1fbe05499af32d25750498b244bc0597592,26d75662f915661dd2f87477fca1c00443d6aa2f..d38ab0b83fd46e4b3f7c0e81bc97a4b313925786
--- 1/git-rebase.sh
--- 2/git-rebase.sh
+++ b/git-rebase.sh
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"
# 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"