Merge branch 'jn/rerere-fail-on-auto-update-failure' into maint
[gitweb.git] / t / t1450-fsck.sh
index d00b70f99deffc6a4009fcea2ef387aade68d3e6..cfb32b62420dc162e79aaea29a36f7d78f3353f5 100755 (executable)
@@ -229,8 +229,12 @@ test_expect_success 'tag with incorrect tag name & missing tagger' '
        echo $tag >.git/refs/tags/wrong &&
        test_when_finished "git update-ref -d refs/tags/wrong" &&
        git fsck --tags 2>out &&
-       grep "invalid .tag. name" out &&
-       grep "expected .tagger. line" out
+
+       cat >expect <<-EOF &&
+       warning in tag $tag: invalid '\''tag'\'' name: wrong name format
+       warning in tag $tag: invalid format - expected '\''tagger'\'' line
+       EOF
+       test_cmp expect out
 '
 
 test_expect_success 'tag with bad tagger' '
@@ -345,6 +349,21 @@ dot-backslash-case .\\\\.GIT\\\\foobar
 dotgit-case-backslash .git\\\\foobar
 EOF
 
+test_expect_success 'fsck allows .Ňit' '
+       (
+               git init not-dotgit &&
+               cd not-dotgit &&
+               echo content >file &&
+               git add file &&
+               git commit -m base &&
+               blob=$(git rev-parse :file) &&
+               printf "100644 blob $blob\t.\\305\\207it" >tree &&
+               tree=$(git mktree <tree) &&
+               git fsck 2>err &&
+               test_line_count = 0 err
+       )
+'
+
 # create a static test repo which is broken by omitting
 # one particular object ($1, which is looked up via rev-parse
 # in the new repository).