Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
whatchanged: customize diff-tree output
author
Junio C Hamano
<junkio@cox.net>
Thu, 22 Dec 2005 06:25:00 +0000
(22:25 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 22 Dec 2005 07:48:45 +0000
(23:48 -0800)
This allows the configuration item whatchanged.difftree to
control the output from git-whatchanged command. For example:
[whatchanged]
difftree = --pretty=fuller --name-status -M
does rename detection, shows the commit header in "fuller"
format and lists affected pathnames and the kind of changes to
them.
When no such configuration item exists, the output format
defaults to "--pretty -M --abbrev".
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-whatchanged.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ebc12ce
)
diff --git
a/git-whatchanged.sh
b/git-whatchanged.sh
index b170f74a94e42dbf82f2e94b831f1cf6b49a2b4c..80e2500e0ea1769d9d92454c667852dd2056ef04 100755
(executable)
--- a/
git-whatchanged.sh
+++ b/
git-whatchanged.sh
@@
-4,9
+4,15
@@
USAGE='[-p] [--max-count=<n>] [<since>..<limit>] [--pretty=<format>] [-m] [git-d
SUBDIRECTORY_OK='Yes'
. git-sh-setup
SUBDIRECTORY_OK='Yes'
. git-sh-setup
+diff_tree_flags=$(git-rev-parse --sq --no-revs --flags "$@")
+test -z "$diff_tree_flags" &&
+ diff_tree_flags=$(git-repo-config --get whatchanged.difftree)
+test -z "$diff_tree_flags" &&
+ diff_tree_flags='-M --abbrev'
+
rev_list_args=$(git-rev-parse --sq --default HEAD --revs-only "$@") &&
rev_list_args=$(git-rev-parse --sq --default HEAD --revs-only "$@") &&
-diff_tree_args=$(git-rev-parse --sq --no-revs "$@") &&
+diff_tree_args=$(git-rev-parse --sq --no-revs
--no-flags
"$@") &&
eval "git-rev-list $rev_list_args" |
eval "git-rev-list $rev_list_args" |
-eval "git-diff-tree --stdin --pretty -r $diff_tree_args" |
+eval "git-diff-tree --stdin --pretty -r $diff_tree_
flags $diff_tree_
args" |
LESS="$LESS -S" ${PAGER:-less}
LESS="$LESS -S" ${PAGER:-less}