summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18bece4)
raw | patch | inline | side by side (parent: 18bece4)
author | Alex Riesen <raa.lkml@gmail.com> | |
Wed, 23 May 2007 21:01:29 +0000 (23:01 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 25 May 2007 04:37:08 +0000 (21:37 -0700) |
The diffstat can be controlled either with command-line options
(--summary|--no-summary) or with merge.diffstat. The default is
left as it was: diffstat is active by default.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(--summary|--no-summary) or with merge.diffstat. The default is
left as it was: diffstat is active by default.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-merge.txt | patch | blob | history | |
Documentation/merge-options.txt | patch | blob | history | |
git-merge.sh | patch | blob | history | |
git-pull.sh | patch | blob | history |
index 9c08efa53abc2797a7b7ca0e589d83b9a4387987..912ef29efce71d944af59588c6493591efc96bfc 100644 (file)
SYNOPSIS
--------
[verse]
-'git-merge' [-n] [--no-commit] [--squash] [-s <strategy>]...
+'git-merge' [-n] [--summary] [--no-commit] [--squash] [-s <strategy>]...
[-m <msg>] <remote> <remote>...
DESCRIPTION
index 182cef54be5963ff0f32a24329ca195607413e29..56f1d8d69d05bb4aa26d0dad6e576332588090e8 100644 (file)
+--summary::
+ Show a diffstat at the end of the merge. The diffstat is also
+ controlled by the configuration option merge.diffstat.
+
-n, \--no-summary::
Do not show diffstat at the end of the merge.
diff --git a/git-merge.sh b/git-merge.sh
index 351676f6d4a39c1ac682296781f4f5c8d1a3053d..44e9b70a6550f11e3bbf5dcf7f71d76a4c1bcd07 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
# Copyright (c) 2005 Junio C Hamano
#
-USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commit>+'
+USAGE='[-n] [--summary] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commit>+'
SUBDIRECTORY_OK=Yes
. git-sh-setup
'')
;;
?*)
- case "$no_summary" in
- '')
+ if test "$show_diffstat" = t
+ then
# We want color (if set), but no pager
GIT_PAGER='' git-diff --stat --summary -M "$head" "$1"
- ;;
- esac
+ fi
;;
esac
}
case "$1" in
-n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\
--no-summa|--no-summar|--no-summary)
- no_summary=t ;;
+ show_diffstat=false ;;
+ --summary)
+ show_diffstat=t ;;
--sq|--squ|--squa|--squas|--squash)
squash=t no_commit=t ;;
--no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)
shift
done
+if test -z "$show_diffstat"; then
+ test "$(git-config --bool merge.diffstat)" = false && show_diffstat=false
+ test -z "$show_diffstat" && show_diffstat=t
+fi
+
# This could be traditional "merge <msg> HEAD <commit>..." and the
# way we can tell it is to see if the second token is HEAD, but some
# people might have misused the interface and used a committish that
diff --git a/git-pull.sh b/git-pull.sh
index a3665d7751cc836dc669390df7b972c29575037b..ba0ca079e204a464ee05b6c000ed891ed3c08b33 100755 (executable)
--- a/git-pull.sh
+++ b/git-pull.sh
-n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\
--no-summa|--no-summar|--no-summary)
no_summary=-n ;;
+ --summary)
+ no_summary=$1
+ ;;
--no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)
no_commit=--no-commit ;;
--sq|--squ|--squa|--squas|--squash)