Skip to content

Commit a334e12

Browse files
torarnvgitster
authored andcommitted
git-pull: Allow --stat and --no-stat to be used with --rebase
Forwards the --stat, --no-stat, and --summary options on to git-rebase. Signed-off-by: Tor Arne Vestbø <torarnv@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent a9c3821 commit a334e12

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

git-pull.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cd_to_toplevel
1616
test -z "$(git ls-files -u)" ||
1717
die "You are in the middle of a conflicted merge."
1818

19-
strategy_args= no_stat= no_commit= squash= no_ff= log_arg= verbosity=
19+
strategy_args= diffstat= no_commit= squash= no_ff= log_arg= verbosity=
2020
curr_branch=$(git symbolic-ref -q HEAD)
2121
curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
2222
rebase=$(git config --bool branch.$curr_branch_short.rebase)
@@ -28,9 +28,9 @@ do
2828
-v|--verbose)
2929
verbosity="$verbosity -v" ;;
3030
-n|--no-stat|--no-summary)
31-
no_stat=-n ;;
31+
diffstat=--no-stat ;;
3232
--stat|--summary)
33-
no_stat=$1 ;;
33+
diffstat=--stat ;;
3434
--log|--no-log)
3535
log_arg=$1 ;;
3636
--no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)
@@ -188,7 +188,7 @@ fi
188188

189189
merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
190190
test true = "$rebase" &&
191-
exec git-rebase $strategy_args --onto $merge_head \
191+
exec git-rebase $diffstat $strategy_args --onto $merge_head \
192192
${oldremoteref:-$merge_head}
193-
exec git-merge $no_stat $no_commit $squash $no_ff $log_arg $strategy_args \
193+
exec git-merge $diffstat $no_commit $squash $no_ff $log_arg $strategy_args \
194194
"$merge_name" HEAD $merge_head $verbosity

0 commit comments

Comments
 (0)