git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 03/10] t1450: make hash size independent
Date: Tue, 11 Jun 2019 23:35:31 +0000	[thread overview]
Message-ID: <20190611233530.GZ8616@genre.crustytoothpaste.net> (raw)
In-Reply-To: <20190611230255.146381-1-jonathantanmy@google.com>

[-- Attachment #1: Type: text/plain, Size: 1969 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

  parent reply	other threads:[~2019-06-11 23:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-09 22:43 [PATCH 00/10] Hash-independent tests, part 4 brian m. carlson
2019-06-09 22:43 ` [PATCH 01/10] t: add helper to convert object IDs to paths brian m. carlson
2019-06-09 22:43 ` [PATCH 02/10] t1410: make hash size independent brian m. carlson
2019-06-09 22:43 ` [PATCH 03/10] t1450: " brian m. carlson
2019-06-10  7:57   ` Eric Sunshine
2019-06-10 22:09     ` brian m. carlson
2019-06-11 23:02   ` Jonathan Tan
2019-06-11 23:20     ` Eric Sunshine
2019-06-11 23:40       ` brian m. carlson
2019-06-11 23:35     ` brian m. carlson [this message]
2019-06-09 22:43 ` [PATCH 04/10] t5000: make hash independent brian m. carlson
2019-06-09 22:43 ` [PATCH 05/10] t6030: make test work with SHA-256 brian m. carlson
2019-06-09 22:43 ` [PATCH 06/10] t0027: make hash size independent brian m. carlson
2019-06-09 22:43 ` [PATCH 07/10] t0090: make test pass with SHA-256 brian m. carlson
2019-06-09 22:43 ` [PATCH 08/10] t1007: remove SHA1 prerequisites brian m. carlson
2019-06-09 22:43 ` [PATCH 09/10] t1710: make hash independent brian m. carlson
2019-06-09 22:44 ` [PATCH 10/10] t2203: avoid hard-coded object ID values brian m. carlson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190611233530.GZ8616@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).