diff options
author | David Aguilar <davvid@gmail.com> | 2016-10-07 17:01:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-11 10:04:31 -0700 |
commit | 654311bf6ee0fbf530c088271c2c76d46f31f82d (patch) | |
tree | a9139ebc933c04178ec29f99143b7a9c624a5ec0 /git-mergetool.sh | |
parent | 57937f70a09c12ef484c290865dac4066d207c9c (diff) | |
download | git-654311bf6ee0fbf530c088271c2c76d46f31f82d.tar.gz |
mergetool: honor -O<orderfile>da/mergetool-diff-order
Teach mergetool to pass "-O<orderfile>" down to `git diff` when
specified on the command-line.
Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-mergetool.sh')
-rwxr-xr-x | git-mergetool.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh index 65696d8382..e52b4e4f24 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -9,7 +9,7 @@ # at the discretion of Junio C Hamano. # -USAGE='[--tool=tool] [--tool-help] [-y|--no-prompt|--prompt] [file to merge] ...' +USAGE='[--tool=tool] [--tool-help] [-y|--no-prompt|--prompt] [-O<orderfile>] [file to merge] ...' SUBDIRECTORY_OK=Yes NONGIT_OK=Yes OPTIONS_SPEC= @@ -390,6 +390,7 @@ print_noop_and_exit () { main () { prompt=$(git config --bool mergetool.prompt) guessed_merge_tool=false + orderfile= while test $# != 0 do @@ -419,6 +420,9 @@ main () { --prompt) prompt=true ;; + -O*) + orderfile="$1" + ;; --) shift break @@ -460,7 +464,8 @@ main () { fi files=$(git -c core.quotePath=false \ - diff --name-only --diff-filter=U -- "$@") + diff --name-only --diff-filter=U \ + ${orderfile:+"$orderfile"} -- "$@") cd_to_toplevel |