On 2019-06-11 at 23:02:55, Jonathan Tan wrote: > > @@ -84,7 +86,7 @@ test_expect_success 'branch pointing to non-commit' ' > > test_expect_success 'HEAD link pointing at a funny object' ' > > test_when_finished "mv .git/SAVED_HEAD .git/HEAD" && > > mv .git/HEAD .git/SAVED_HEAD && > > - echo 0000000000000000000000000000000000000000 >.git/HEAD && > > + echo $ZERO_OID >.git/HEAD && > > # avoid corrupt/broken HEAD from interfering with repo discovery > > test_must_fail env GIT_DIR=.git git fsck 2>out && > > cat out && > > ZERO_OID doesn't seem redefined to the SHA256 variant when being tested > under SHA256. Maybe you need a test_oid invocation here. That's actually coming in a later series. Eventually, test_oid_init will be called automatically and ZERO_OID will be set by calling test_oid with an appropriate value. > I couldn't verify this, though - do you know if there is a way for me to > run the tests with SHA256 instead of SHA1? There isn't any way in Junio's tree, mostly because there are still a lot of places that need fixing. However, all of those commits are in my transition-stage-4 branch at https://github.com/bk2204/git.git, and you can set the environment variable GIT_TEST_DEFAULT_HASH to "sha256" and it will run the test suite with SHA-256. That branch has a fully functional SHA-256 Git if you'd like to test it out, and the same binary can handle SHA-1 and SHA-256. Interoperability between SHA-1 and SHA-256 repos hasn't been implemented yet, though. > > @@ -631,10 +639,12 @@ test_expect_success 'fsck --name-objects' ' > > > > test_expect_success 'alternate objects are correctly blamed' ' > > test_when_finished "rm -rf alt.git .git/objects/info/alternates" && > > + path=$(test_oid numeric) && > > + path=$(test_oid_to_path "$path") && > > Double assignment to path? Good point. Will fix. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204
Attachment:
signature.asc
Description: PGP signature