is_ntfs_dotgit: match other .git files
[gitweb.git] / t / t6501-freshen-objects.sh
index cf076dcd940aa0d74bd8df03b4f6c768e1954455..394b169eada7968875e931c5a43f25a808cfc18f 100755 (executable)
@@ -129,7 +129,7 @@ for repack in '' true; do
        '
 done
 
-test_expect_success 'do not complain about existing broken links' '
+test_expect_success 'do not complain about existing broken links (commit)' '
        cat >broken-commit <<-\EOF &&
        tree 0000000000000000000000000000000000000001
        parent 0000000000000000000000000000000000000002
@@ -144,4 +144,29 @@ test_expect_success 'do not complain about existing broken links' '
        test_must_be_empty stderr
 '
 
+test_expect_success 'do not complain about existing broken links (tree)' '
+       cat >broken-tree <<-\EOF &&
+       100644 blob 0000000000000000000000000000000000000003    foo
+       EOF
+       tree=$(git mktree --missing <broken-tree) &&
+       git gc 2>stderr &&
+       git cat-file -e $tree &&
+       test_must_be_empty stderr
+'
+
+test_expect_success 'do not complain about existing broken links (tag)' '
+       cat >broken-tag <<-\EOF &&
+       object 0000000000000000000000000000000000000004
+       type commit
+       tag broken
+       tagger whatever <whatever@example.com> 1234 -0000
+
+       this is a broken tag
+       EOF
+       tag=$(git hash-object -t tag -w broken-tag) &&
+       git gc 2>stderr &&
+       git cat-file -e $tag &&
+       test_must_be_empty stderr
+'
+
 test_done