diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-05-21 04:02:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-21 04:02:21 -0700 |
commit | 4cbf42e1519015a30401992815331c048ff3c982 (patch) | |
tree | ad877465c105401394e9c32cce8389e055b67d31 /t | |
parent | Merge branch 'jn/gitweb-caching-prep' (diff) | |
parent | fsck: check ident lines in commit objects (diff) | |
download | tgif-4cbf42e1519015a30401992815331c048ff3c982.tar.xz |
Merge branch 'jn/fsck-ident'
* jn/fsck-ident:
fsck: check ident lines in commit objects
Diffstat (limited to 't')
-rwxr-xr-x | t/t1450-fsck.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh index 49cae3ed52..22a80c8268 100755 --- a/t/t1450-fsck.sh +++ b/t/t1450-fsck.sh @@ -57,6 +57,34 @@ test_expect_success 'branch pointing to non-commit' ' git update-ref -d refs/heads/invalid ' +new=nothing +test_expect_success 'email without @ is okay' ' + git cat-file commit HEAD >basis && + sed "s/@/AT/" basis >okay && + new=$(git hash-object -t commit -w --stdin <okay) && + echo "$new" && + git update-ref refs/heads/bogus "$new" && + git fsck 2>out && + cat out && + ! grep "error in commit $new" out +' +git update-ref -d refs/heads/bogus +rm -f ".git/objects/$new" + +new=nothing +test_expect_success 'email with embedded > is not okay' ' + git cat-file commit HEAD >basis && + sed "s/@[a-z]/&>/" basis >bad-email && + new=$(git hash-object -t commit -w --stdin <bad-email) && + echo "$new" && + git update-ref refs/heads/bogus "$new" && + git fsck 2>out && + cat out && + grep "error in commit $new" out +' +git update-ref -d refs/heads/bogus +rm -f ".git/objects/$new" + cat > invalid-tag <<EOF object ffffffffffffffffffffffffffffffffffffffff type commit |