diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-10-28 10:43:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-28 10:43:32 -0700 |
commit | 2125261b631c429175821299ece33449dbd3ab96 (patch) | |
tree | a0c023a96dc3925dfe666dc337727c63347617cd /t | |
parent | 93542d90c005ee614ce6ad4dde16b89764cdea67 (diff) | |
parent | 03818a4a94cbe8154eae433892e92d58d215dade (diff) | |
download | git-2125261b631c429175821299ece33449dbd3ab96.tar.gz git-2125261b631c429175821299ece33449dbd3ab96.tar.xz |
Merge branch 'jk/split-broken-ident'
Make the fall-back parsing of commit objects with broken author or
committer lines more robust to pick up the timestamps.
* jk/split-broken-ident:
split_ident: parse timestamp from end of line
Diffstat (limited to 't')
-rwxr-xr-x | t/t4212-log-corrupt.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/t4212-log-corrupt.sh b/t/t4212-log-corrupt.sh index ec5099b83..93c7c366c 100755 --- a/t/t4212-log-corrupt.sh +++ b/t/t4212-log-corrupt.sh @@ -13,11 +13,16 @@ test_expect_success 'setup' ' git update-ref refs/heads/broken_email $(cat broken_email.hash) ' +test_expect_success 'fsck notices broken commit' ' + git fsck 2>actual && + test_i18ngrep invalid.author actual +' + test_expect_success 'git log with broken author email' ' { echo commit $(cat broken_email.hash) echo "Author: A U Thor <author@example.com>" - echo "Date: Thu Jan 1 00:00:00 1970 +0000" + echo "Date: Thu Apr 7 15:13:13 2005 -0700" echo echo " foo" } >expect.out && @@ -30,7 +35,7 @@ test_expect_success 'git log with broken author email' ' ' test_expect_success 'git log --format with broken author email' ' - echo "A U Thor+author@example.com+" >expect.out && + echo "A U Thor+author@example.com+Thu Apr 7 15:13:13 2005 -0700" >expect.out && : >expect.err && git log --format="%an+%ae+%ad" broken_email >actual.out 2>actual.err && |