git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 03/10] t1450: make hash size independent

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Jun 11, 2019, 23:02 UTC
Message-ID
<20190611230255.146381-1-jonathantanmy@google.com>
In-Reply-To
<20190609224400.41557-4-sandals@crustytoothpaste.net>
Show 9 quoted lines
> @@ -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.

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?

Show 7 quoted lines
> @@ -417,13 +426,12 @@ test_expect_success 'force fsck to ignore double author' '
>  '
>  
>  _bz='\0'
> -_bz5="$_bz$_bz$_bz$_bz$_bz"
> -_bz20="$_bz5$_bz5$_bz5$_bz5"
> +_bzoid=$(printf $ZERO_OID | sed -e 's/00/\\0/g')
Same comment here.
Show 6 quoted lines
> @@ -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?
Previous: brian m. carlsonNext: Eric Sunshine
Message 7 of 17 in “Hash-independent tests, part 4”
  1. 00/10 Hash-independent tests, part 4brian m. carlson, Jun 9, 2019
  2. 01/10 t: add helper to convert object IDs to pathsbrian m. carlson, Jun 9, 2019
  3. 02/10 t1410: make hash size independentbrian m. carlson, Jun 9, 2019
  4. 03/10 t1450: make hash size independentbrian m. carlson, Jun 9, 2019
  5. Eric SunshineJun 10, 2019
  6. brian m. carlsonJun 10, 2019
  7. Jonathan TanJun 11, 2019
  8. Eric SunshineJun 11, 2019
  9. brian m. carlsonJun 11, 2019
  10. brian m. carlsonJun 11, 2019
  11. 04/10 t5000: make hash independentbrian m. carlson, Jun 9, 2019
  12. 06/10 t0027: make hash size independentbrian m. carlson, Jun 9, 2019
  13. 05/10 t6030: make test work with SHA-256brian m. carlson, Jun 9, 2019
  14. 07/10 t0090: make test pass with SHA-256brian m. carlson, Jun 9, 2019
  15. 08/10 t1007: remove SHA1 prerequisitesbrian m. carlson, Jun 9, 2019
  16. 10/10 t2203: avoid hard-coded object ID valuesbrian m. carlson, Jun 9, 2019
  17. 09/10 t1710: make hash independentbrian m. carlson, Jun 9, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.