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>
This commit is contained in:

committed by
Junio C Hamano

parent
60aced3dfa
commit
7f978d7d10
@ -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
|
||||
|
Reference in New Issue
Block a user