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

Add colour support in rebase and merge tree diff stats output.

The rebase and merge commands used diff-tree to display the summary stats of what files had changed from the operation. diff-tree does not read the diff ui configuration options, so the diff.color setting was not used. Have rebase and merge call diff rather than diff-tree, which does read the diff ui options. Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

James Bowes committed May 5, 2007 at 16:48 UTC fefe49d134b4dadf3a184ba7a8e48388f3c15a24
2 files changed +4 -2
git-merge.sh
+2 -1
@@ -90,7 +90,8 @@ finish () {
90 ?*)
91 case "$no_summary" in
92 '')
93 - git-diff-tree --stat --summary -M "$head" "$1"
93 + # We want color (if set), but no pager
94 + GIT_PAGER='' git-diff --stat --summary -M "$head" "$1"
95 ;;
96 esac
97 ;;
git-rebase.sh
+2 -1
@@ -307,7 +307,8 @@ fi
307 if test -n "$verbose"
308 then
309 echo "Changes from $mb to $onto:"
310 - git-diff-tree --stat --summary "$mb" "$onto"
310 + # We want color (if set), but no pager
311 + GIT_PAGER='' git-diff --stat --summary "$mb" "$onto"
312 fi
313
314 # Rewind the head to "$onto"; this saves our current head in ORIG_HEAD.