pickaxe tests: test for -G, -S and --find-object incompatibility

Add a test for the options sanity check added in 5e505257f2 (diff: properly error out when combining multiple pickaxe options, 2018-01-04). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Apr 12, 2021 at 19:15 UTC 064952fc34b9765282fec057b3af260eae7c75c6
1 file changed +11
t/t4209-log-pickaxe.sh
+11
@@ -55,6 +55,17 @@ test_expect_success setup '
55 git rev-parse --verify HEAD >expect_second
56 '
57
58 +test_expect_success 'usage' '
59 + test_expect_code 128 git log -Gregex -Sstring 2>err &&
60 + grep "mutually exclusive" err &&
61 +
62 + test_expect_code 128 git log -Gregex --find-object=HEAD 2>err &&
63 + grep "mutually exclusive" err &&
64 +
65 + test_expect_code 128 git log -Sstring --find-object=HEAD 2>err &&
66 + grep "mutually exclusive" err
67 +'
68 +
69 test_log expect_initial --grep initial
70 test_log expect_nomatch --grep InItial
71 test_log_icase expect_initial --grep InItial