Merge branch 'maint-2.0' into maint-2.1
authorJunio C Hamano <gitster@pobox.com>
Wed, 7 Jan 2015 21:27:56 +0000 (13:27 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Jan 2015 21:27:56 +0000 (13:27 -0800)
* maint-2.0:
is_hfs_dotgit: loosen over-eager match of \u{..47}

1  2 
t/t1450-fsck.sh
utf8.c
diff --cc t/t1450-fsck.sh
index 426f753fe3e4907a151be87be247a32bf9741905,a5589e2da7d59d2d303ca5a5b5eadc968c87f5c9..6475f10bc5333c4e4d333875347c4b0df53f2019
@@@ -307,60 -287,19 +307,75 @@@ dot-backslash-case .\\\\.GIT\\\\fooba
  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).
 +create_repo_missing () {
 +      rm -rf missing &&
 +      git init missing &&
 +      (
 +              cd missing &&
 +              git commit -m one --allow-empty &&
 +              mkdir subdir &&
 +              echo content >subdir/file &&
 +              git add subdir/file &&
 +              git commit -m two &&
 +              unrelated=$(echo unrelated | git hash-object --stdin -w) &&
 +              git tag -m foo tag $unrelated &&
 +              sha1=$(git rev-parse --verify "$1") &&
 +              path=$(echo $sha1 | sed 's|..|&/|') &&
 +              rm .git/objects/$path
 +      )
 +}
 +
 +test_expect_success 'fsck notices missing blob' '
 +      create_repo_missing HEAD:subdir/file &&
 +      test_must_fail git -C missing fsck
 +'
 +
 +test_expect_success 'fsck notices missing subtree' '
 +      create_repo_missing HEAD:subdir &&
 +      test_must_fail git -C missing fsck
 +'
 +
 +test_expect_success 'fsck notices missing root tree' '
 +      create_repo_missing HEAD^{tree} &&
 +      test_must_fail git -C missing fsck
 +'
 +
 +test_expect_success 'fsck notices missing parent' '
 +      create_repo_missing HEAD^ &&
 +      test_must_fail git -C missing fsck
 +'
 +
 +test_expect_success 'fsck notices missing tagged object' '
 +      create_repo_missing tag^{blob} &&
 +      test_must_fail git -C missing fsck
 +'
 +
 +test_expect_success 'fsck notices ref pointing to missing commit' '
 +      create_repo_missing HEAD &&
 +      test_must_fail git -C missing fsck
 +'
 +
 +test_expect_success 'fsck notices ref pointing to missing tag' '
 +      create_repo_missing tag &&
 +      test_must_fail git -C missing fsck
 +'
 +
  test_done
diff --cc utf8.c
Simple merge