]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3103-ls-tree-misc.sh
The eighth batch
[thirdparty/git.git] / t / t3103-ls-tree-misc.sh
index d18ba1bd84bb473888c5e24191d79f9d0a792358..81c6343962381fc17b1bff4d3ca8958951bde70d 100755 (executable)
@@ -23,4 +23,19 @@ test_expect_success 'ls-tree fails with non-zero exit code on broken tree' '
        test_must_fail git ls-tree -r HEAD
 '
 
+for opts in \
+       "--long --name-only" \
+       "--name-only --name-status" \
+       "--name-status --object-only" \
+       "--object-only --long"
+do
+       test_expect_success "usage: incompatible options: $opts" '
+               test_expect_code 129 git ls-tree $opts $tree
+       '
+
+       one_opt=$(echo "$opts" | cut -d' '  -f1)
+       test_expect_success "usage: incompatible options: $one_opt and --format" '
+               test_expect_code 129 git ls-tree $one_opt --format=fmt $tree
+       '
+done
 test_done