From: Junio C Hamano Date: Mon, 11 May 2015 21:23:49 +0000 (-0700) Subject: Merge branch 'jk/rebase-quiet-noop' X-Git-Tag: v2.5.0-rc0~132 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/352618287e469889c85da4f2fd32c03d5ac2f3dc?ds=inline;hp=-c Merge branch 'jk/rebase-quiet-noop' "git rebase --quiet" was not quite quiet when there is nothing to do. * jk/rebase-quiet-noop: rebase: silence "git checkout" for noop rebase --- 352618287e469889c85da4f2fd32c03d5ac2f3dc diff --combined git-rebase.sh index fb935a03f3,ba74d11941..1757404bc2 --- a/git-rebase.sh +++ b/git-rebase.sh @@@ -59,7 -59,6 +59,7 @@@ If you prefer to skip this patch, run " To check out the original branch and stop rebasing, run "git rebase --abort".') " unset onto +unset restrict_revision cmd= strategy= strategy_opts= @@@ -202,9 -201,9 +202,9 @@@ run_specific_rebase () run_pre_rebase_hook () { if test -z "$ok_to_skip_pre_rebase" && - test -x "$GIT_DIR/hooks/pre-rebase" + test -x "$(git rev-parse --git-path hooks/pre-rebase)" then - "$GIT_DIR/hooks/pre-rebase" ${1+"$@"} || + "$(git rev-parse --git-path hooks/pre-rebase)" ${1+"$@"} || die "$(gettext "The pre-rebase hook refused to rebase.")" fi } @@@ -467,8 -466,8 +467,8 @@@ the else if test -z "$onto" then - empty_tree=`git hash-object -t tree /dev/null` - onto=`git commit-tree $empty_tree /dev/null then @@@ -582,7 -581,7 +582,7 @@@ # Lazily switch to the target branch if needed... test -z "$switch_to" || GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $switch_to" \ - git checkout "$switch_to" -- + git checkout -q "$switch_to" -- say "$(eval_gettext "Current branch \$branch_name is up to date.")" finish_rebase exit 0 @@@ -627,7 -626,7 +627,7 @@@ if test -n "$rebase_root then revisions="$onto..$orig_head" else - revisions="$upstream..$orig_head" + revisions="${restrict_revision-$upstream}..$orig_head" fi run_specific_rebase