diff options
author | Denton Liu <liu.denton@gmail.com> | 2019-04-29 06:21:17 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-13 14:11:59 (GMT) |
commit | 7f978d7d10a87c4a56ea3101b936cddb25bbe2c6 (patch) | |
tree | a974ee6fc7fc745081d5a2e90e570fc0247b295f /t/t7800-difftool.sh | |
parent | 60aced3dfa68df60952fed28c4ae63a5bbda0275 (diff) | |
download | git-7f978d7d10a87c4a56ea3101b936cddb25bbe2c6.zip git-7f978d7d10a87c4a56ea3101b936cddb25bbe2c6.tar.gz git-7f978d7d10a87c4a56ea3101b936cddb25bbe2c6.tar.bz2 |
difftool: make --gui, --tool and --extcmd mutually exclusive
In git-difftool, these options specify which tool to ultimately run. As
a result, they are logically conflicting. Explicitly disallow these
options from being used together.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7800-difftool.sh')
-rwxr-xr-x | t/t7800-difftool.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index 562bd21..833e175 100755 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@ -705,4 +705,12 @@ test_expect_success SYMLINKS 'difftool --dir-diff handles modified symlinks' ' test_cmp expect actual ' +test_expect_success 'difftool --gui, --tool and --extcmd are mutually exclusive' ' + difftool_test_setup && + test_must_fail git difftool --gui --tool=test-tool && + test_must_fail git difftool --gui --extcmd=cat && + test_must_fail git difftool --tool=test-tool --extcmd=cat && + test_must_fail git difftool --gui --tool=test-tool --extcmd=cat +' + test_done |