]> git.ipfire.org Git - thirdparty/git.git/commit
t1006: don't strip timestamps from expected results
authorPatrick Steinhardt <ps@pks.im>
Tue, 6 Jun 2023 05:19:29 +0000 (07:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Jun 2023 20:23:24 +0000 (13:23 -0700)
commitc7309f63c606cebd4dea8b2a31e5ffbb2e2bf205
tree88372c2dd17ef7cd8d7492f94bbac9f86d3e1470
parentfe86abd7511a9a6862d5706c6fa1d9b57a63ba09
t1006: don't strip timestamps from expected results

In t1006 we have a bunch of tests that verify the output format of the
git-cat-file(1) command. But while part of the output for some tests
would include commit timestamps, we don't verify those but instead strip
them before comparing expected with actual results. This is done by the
function `maybe_remove_timestamp`, which goes all the way back to the
ancient commit b335d3f121 (Add tests for git cat-file, 2008-04-23).

Our tests had been in a different shape back then. Most importantly we
didn't yet have the infrastructure to create objects with deterministic
timestamps. Nowadays we do though, and thus there is no reason anymore
to strip the timestamps.

Refactor the tests to not strip the timestamp anymore.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1006-cat-file.sh