summaryrefslogtreecommitdiff
path: root/git-whatchanged.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-whatchanged.sh')
-rwxr-xr-xgit-whatchanged.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-whatchanged.sh b/git-whatchanged.sh
index b170f74..80e2500 100755
--- 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
+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 "$@") &&
-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-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}