summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff-tree_--cc_--patch-with-stat_master
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2025-10-28 11:01:45 -0500
committerJunio C Hamano <gitster@pobox.com>2025-10-28 20:10:15 -0700
commitf711f37b05b7ff11038a707ec1f0f72aca98581c (patch)
tree7aed3bb3e0794fef2dd07e5e59c415fbc331dadd /t/t4013/diff.diff-tree_--cc_--patch-with-stat_master
parenta1cf0cf13ab3a659ac77b7d749d6e5b11dc0142b (diff)
t1016-compatObjectFormat: really freeze time for reproduciblity
The strategy in t1016-compatObjectFormat is to build two trees with identical commits, one tree encoded in sha1 the other tree encoded in sha256 and to use the compatibility code to test and see if the two trees are identical. GPG signatures include the current time as part of the signature. To make gpg deterministic I forced the use of gpg --faked-system-time. Unfortunately I did not look closely enough. By default gpg still allows time to move forward with --faked-system-time. So in those rare instances when the system is heavily loaded and gpg runs slower than other times, signatures over the exact same data differ due to timestamps with a minuscule difference. Reading through the gpg documentation with a close eye, time can be frozen by including an exclamation point at the end of the argument to --faked-system-time. Add the exclamation point so gpg really runs with a fixed notion of time, resulting in the exact same data having identical gpg signatures. That is enough that I can run "t1016-compatObjectFormat.sh --stress" and I don't see any failures. It is possible a future change to gpg will make replay protection more robust and not provide a way to allow two separate runs of gpg to produce exactly the same signature for exactly the same data. If that happens a deeper comparison of the two repositories will need to be performed. A comparison that simply verifies the signatures and compares the data for equality. For now that is a lot of work for no gain so I am just documenting the possibility. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff-tree_--cc_--patch-with-stat_master')
0 files changed, 0 insertions, 0 deletions