]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pickaxe tests: test for -G, -S and --find-object incompatibility
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 12 Apr 2021 17:15:12 +0000 (19:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 May 2021 03:47:31 +0000 (12:47 +0900)
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>
t/t4209-log-pickaxe.sh

index 9fa770b5fbd4009a77c0c843b4d7e9f972f08db9..21e22af1e7ee94b5e9202c794f0e7bda671c04e1 100755 (executable)
@@ -55,6 +55,17 @@ test_expect_success setup '
        git rev-parse --verify HEAD >expect_second
 '
 
+test_expect_success 'usage' '
+       test_expect_code 128 git log -Gregex -Sstring 2>err &&
+       grep "mutually exclusive" err &&
+
+       test_expect_code 128 git log -Gregex --find-object=HEAD 2>err &&
+       grep "mutually exclusive" err &&
+
+       test_expect_code 128 git log -Sstring --find-object=HEAD 2>err &&
+       grep "mutually exclusive" err
+'
+
 test_log       expect_initial  --grep initial
 test_log       expect_nomatch  --grep InItial
 test_log_icase expect_initial  --grep InItial