Skip to content

Commit 61cc4be

Browse files
peffgitster
authored andcommitted
t1006: stop using 0-padded timestamps
The fake objects in t1006 use dummy timestamps like "0000000000 +0000". While this does make them look more like normal timestamps (which, unless it is 1970, have many digits), it actually violates our fsck checks, which complain about zero-padded timestamps. This doesn't currently break anything, but let's future-proof our tests against a version of hash-object which is a little more careful about its input. We don't actually care about the exact values here (and in fact, the helper functions in this script end up removing the timestamps anyway, so we don't even have to adjust other parts of the tests). Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6e26460 commit 61cc4be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t1006-cat-file.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ commit_message="Initial commit"
292292
commit_sha1=$(echo_without_newline "$commit_message" | git commit-tree $tree_sha1)
293293
commit_size=$(($(test_oid hexsz) + 137))
294294
commit_content="tree $tree_sha1
295-
author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 0000000000 +0000
296-
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 0000000000 +0000
295+
author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 0 +0000
296+
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 0 +0000
297297
298298
$commit_message"
299299

@@ -304,7 +304,7 @@ type blob
304304
tag hellotag
305305
tagger $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
306306
tag_description="This is a tag"
307-
tag_content="$tag_header_without_timestamp 0000000000 +0000
307+
tag_content="$tag_header_without_timestamp 0 +0000
308308
309309
$tag_description"
310310

0 commit comments

Comments
 (0)