@matheusbsbs / matheus-bagliano / commits / a334e1254c
Fork 0

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>

Tor Arne Vestbø committed Mar 1, 2009 at 22:28 UTC a334e1254c0c2d55f20b271872fbac9a6a67218b
1 file changed +5 -5
git-pull.sh
+5 -5
@@ -16,7 +16,7 @@ cd_to_toplevel
16 test -z "$(git ls-files -u)" ||
17 die "You are in the middle of a conflicted merge."
18
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=
20 curr_branch=$(git symbolic-ref -q HEAD)
21 curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
22 rebase=$(git config --bool branch.$curr_branch_short.rebase)
@@ -28,9 +28,9 @@ do
28 -v|--verbose)
29 verbosity="$verbosity -v" ;;
30 -n|--no-stat|--no-summary)
31 - no_stat=-n ;;
31 + diffstat=--no-stat ;;
32 --stat|--summary)
33 - no_stat=$1 ;;
33 + diffstat=--stat ;;
34 --log|--no-log)
35 log_arg=$1 ;;
36 --no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)
@@ -188,7 +188,7 @@ fi
188
189 merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
190 test true = "$rebase" &&
191 - exec git-rebase $strategy_args --onto $merge_head \
191 + exec git-rebase $diffstat $strategy_args --onto $merge_head \
192 ${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 \
194 "$merge_name" HEAD $merge_head $verbosity