Skip to content

smarthttp: Fix tests where hashing garbage will break with Git v2.40

Patrick Steinhardt requested to merge pks-smarthttp-fix-hashing-garbage into master

With 69bbbe484b (hash-object: use fsck for object checks, 2023-01-18), Git starts to check objects that are being written into the ODB via git-hash-object(1). This breaks one of our tests in the smarthttp service that intentionally writes broken objects in order to check that we correctly catch these when serving a push.

Fix these tests by using our gittest.WriteTree() helper, which does not use git-hash-object(1) in the first place, and by disabling object consistency checks via --literally.

Merge request reports