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 /t/t7610-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 't/t7610-mergetool.sh')
-rwxr-xr-x | t/t7610-mergetool.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index 38c1e4de71..6d9f21511f 100755 --- a/t/t7610-mergetool.sh +++ b/t/t7610-mergetool.sh @@ -638,5 +638,32 @@ test_expect_success 'diff.orderFile configuration is honored' ' test_cmp expect actual && git reset --hard >/dev/null ' +test_expect_success 'mergetool -Oorder-file is honored' ' + test_config diff.orderFile order-file && + test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" && + test_config mergetool.myecho.trustExitCode true && + test_must_fail git merge order-file-side1 && + cat >expect <<-\EOF && + Merging: + a + b + EOF + git mergetool -O/dev/null --no-prompt --tool myecho >output && + git grep --no-index -h -A2 Merging: output >actual && + test_cmp expect actual && + git reset --hard >/dev/null 2>&1 && + + git config --unset diff.orderFile && + test_must_fail git merge order-file-side1 && + cat >expect <<-\EOF && + Merging: + b + a + EOF + git mergetool -Oorder-file --no-prompt --tool myecho >output && + git grep --no-index -h -A2 Merging: output >actual && + test_cmp expect actual && + git reset --hard >/dev/null 2>&1 +' test_done |