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

Re: [PATCH 3/3] multi-pack-index: use hash version byte

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 14, 2020, 20:14 UTC
Message-ID
<20200814201448.GL8085@camp.crustytoothpaste.net>
In-Reply-To
<b4645789adf26e46cea721896867135941fb7654.1597428440.git.gitgitgadget@gmail.com>
On 2020-08-14 at 18:07:20, Derrick Stolee via GitGitGadget wrote:
Show 24 quoted lines
> diff --git a/midx.c b/midx.c
> index a5fb797ede..0c165a40f5 100644
> --- a/midx.c
> +++ b/midx.c
> @@ -17,7 +17,6 @@
>  #define MIDX_BYTE_HASH_VERSION 5
>  #define MIDX_BYTE_NUM_CHUNKS 6
>  #define MIDX_BYTE_NUM_PACKS 8
> -#define MIDX_HASH_VERSION 1
>  #define MIDX_HEADER_SIZE 12
>  #define MIDX_MIN_SIZE (MIDX_HEADER_SIZE + the_hash_algo->rawsz)
>  
> @@ -36,6 +35,15 @@
>  
>  #define PACK_EXPIRED UINT_MAX
>  
> +static uint8_t oid_version(void)
> +{
> +	if (the_hash_algo->rawsz == GIT_SHA1_RAWSZ)
> +		return 1;
> +	if (the_hash_algo->rawsz == GIT_SHA256_RAWSZ)
> +		return 2;
> +	die(_("invalid hash version"));
> +}
I think my same response to the last patch applies here.

Beyond the things I mentioned in the last patch and here, I think this series looks fine.

-- 
brian m. carlson: Houston, Texas, US
Previous: Derrick Stolee via GitGitGadgetNext: Junio C Hamano
Message 14 of 22 in “SHA-256: Update commit-graph and multi-pack-index formats”
  1. 0/3 SHA-256: Update commit-graph and multi-pack-index formatsDerrick Stolee via GitGitGadget, Aug 14, 2020
  2. 1/3 t/README: document GIT_TEST_DEFAULT_HASHDerrick Stolee via GitGitGadget, Aug 14, 2020
  3. Junio C HamanoAug 14, 2020
  4. Eric SunshineAug 14, 2020
  5. Derrick StoleeAug 14, 2020
  6. 2/3 commit-graph: use the hash version byteDerrick Stolee via GitGitGadget, Aug 14, 2020
  7. Junio C HamanoAug 14, 2020
  8. Taylor BlauAug 14, 2020
  9. brian m. carlsonAug 14, 2020
  10. Junio C HamanoAug 14, 2020
  11. Derrick StoleeAug 14, 2020
  12. Martin ÅgrenAug 15, 2020
  13. 3/3 multi-pack-index: use hash version byteDerrick Stolee via GitGitGadget, Aug 14, 2020
  14. brian m. carlsonAug 14, 2020
  15. Junio C HamanoAug 14, 2020
  16. Derrick StoleeAug 14, 2020
  17. Junio C HamanoAug 14, 2020
  18. 0/3 SHA-256: Update commit-graph and multi-pack-index formatsDerrick Stolee via GitGitGadget, Aug 17, 2020
  19. 1/3 t/README: document GIT_TEST_DEFAULT_HASHDerrick Stolee via GitGitGadget, Aug 17, 2020
  20. 2/3 commit-graph: use the "hash version" byteDerrick Stolee via GitGitGadget, Aug 17, 2020
  21. 3/3 multi-pack-index: use hash version byteDerrick Stolee via GitGitGadget, Aug 17, 2020
  22. brian m. carlsonAug 17, 2020

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.