Skip to contentSkip to conversation

git-pull: forward --summary to git-rebase to allow diffstat on --rebase

PATCH/RFC Tor Arne Vestbø 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

git-rebase gets aliases for --summary and --stat to --verbose, as well as a --no-stat, so that git-pull can just forward the --summary directly.

---

Would something like this be welcomed? I'd be happy to tweak the implementation, and add docs, tests, and a config option like merge.stat. Just wanted to check the mood first :)

git-pull.sh   |    2 +-
git-rebase.sh |    5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
git-pull.sh +0 -0
index 75c3610..12e0ae8 100755
@@ -179,7 +179,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 $no_stat $strategy_args --onto $merge_head \
	${oldremoteref:-$merge_head}

exec git-merge $no_stat $no_commit $squash $no_ff $log_arg $strategy_args \
"$merge_name" HEAD $merge_head

git-rebase.sh +0 -0
index 528b604..9940eea 100755
@@ -257,9 +257,12 @@ do
		esac
		do_merge=t
		;;
-	-v|--verbose)
+	-v|--verbose|--stat|--summary)
		verbose=t
		;;
+	-n|--no-stat)
+		verbose=
+		;;
	--whitespace=*)
		git_am_opt="$git_am_opt $1"
		;;
Signature · 1 line
1.6.1.GIT