mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
mergetool: honor -O<orderfile>
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>
This commit is contained in:
committed by
Junio C Hamano
parent
57937f70a0
commit
654311bf6e
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user