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>
This commit is contained in:
James Bowes 2007-05-05 16:48:54 -04:00 committed by Junio C Hamano
parent 843142ada0
commit fefe49d134
2 changed files with 4 additions and 2 deletions

View File

@ -90,7 +90,8 @@ finish () {
?*) ?*)
case "$no_summary" in case "$no_summary" in
'') '')
git-diff-tree --stat --summary -M "$head" "$1" # We want color (if set), but no pager
GIT_PAGER='' git-diff --stat --summary -M "$head" "$1"
;; ;;
esac esac
;; ;;

View File

@ -307,7 +307,8 @@ fi
if test -n "$verbose" if test -n "$verbose"
then then
echo "Changes from $mb to $onto:" echo "Changes from $mb to $onto:"
git-diff-tree --stat --summary "$mb" "$onto" # We want color (if set), but no pager
GIT_PAGER='' git-diff --stat --summary "$mb" "$onto"
fi fi
# Rewind the head to "$onto"; this saves our current head in ORIG_HEAD. # Rewind the head to "$onto"; this saves our current head in ORIG_HEAD.