Skip to content

Commit

Permalink
git-pull: Allow --stat and --no-stat to be used with --rebase
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tor Arne Vestbø authored and Junio C Hamano committed Mar 3, 2009
1 parent a9c3821 commit a334e12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions git-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cd_to_toplevel
test -z "$(git ls-files -u)" ||
die "You are in the middle of a conflicted merge."

strategy_args= no_stat= no_commit= squash= no_ff= log_arg= verbosity=
strategy_args= diffstat= no_commit= squash= no_ff= log_arg= verbosity=
curr_branch=$(git symbolic-ref -q HEAD)
curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
rebase=$(git config --bool branch.$curr_branch_short.rebase)
Expand All @@ -28,9 +28,9 @@ do
-v|--verbose)
verbosity="$verbosity -v" ;;
-n|--no-stat|--no-summary)
no_stat=-n ;;
diffstat=--no-stat ;;
--stat|--summary)
no_stat=$1 ;;
diffstat=--stat ;;
--log|--no-log)
log_arg=$1 ;;
--no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)
Expand Down Expand Up @@ -188,7 +188,7 @@ fi

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

0 comments on commit a334e12

Please sign in to comment.