1#!/bin/sh
2
3USAGE='[-p] [--max-count=<n>] [<since>..<limit>] [--pretty=<format>] [-m] [git-diff-tree options] [git-rev-list options]'
4SUBDIRECTORY_OK='Yes'
5. git-sh-setup
6
7diff_tree_flags=$(git-rev-parse --sq --no-revs --flags "$@") || exit
8test -z "$diff_tree_flags" &&
9 diff_tree_flags=$(git-repo-config --get whatchanged.difftree)
10test -z "$diff_tree_flags" &&
11 diff_tree_flags='-M --abbrev'
12
13rev_list_args=$(git-rev-parse --sq --default HEAD --revs-only "$@") &&
14diff_tree_args=$(git-rev-parse --sq --no-revs --no-flags "$@") &&
15
16eval "git-rev-list $rev_list_args" |
17eval "git-diff-tree --stdin --pretty -r $diff_tree_flags $diff_tree_args" |
18LESS="$LESS -S" ${PAGER:-less}