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

Re: [PATCH v3] bulk-checkin: only support blobs in index_bulk_checkin

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 27, 2023, 16:26 UTC
Message-ID
<xmqq7cobmvjt.fsf@gitster.g>
In-Reply-To
<ZRQ9aSeu/wpJERuV@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
> I am not sure that I follow. If we have an address in memory from which
> we want to stream raw bytes directly to the packfile, that should work
> for all objects regardless of type, no?

For a single hash world, yes. For keeping track of "the other hash" and correspondence, you need to (1) interpret the contents of the object (e.g., if you received a tree contents for SHA-1 repository, you'd need to split them into tree entries and know which parts of the bytestream are SHA-1 hashes of the tree contebnts), (2) come up with the corresponding tree contents in the SHA-256 world (you should be able to do that now you know SHA-1 names of the objects directly referred to by the tree) and hash that using SHA-256, and (3) remember the SHA-1 and the SHA-256 name correspondence of the tree object you just hashed, in addition to the usual (4) hashing the contents using SHA-1 hash algorithm without caring what the byte stream represents.

Previous: Taylor BlauNext: Eric W. Biederman
Message 9 of 12 in “bulk-checkin: only support blobs in index_bulk_checkin”
  1. bulk-checkin: only support blobs in index_bulk_checkinEric W. Biederman, Sep 20, 2023
  2. Junio C HamanoSep 20, 2023
  3. Eric W. BiedermanSep 20, 2023
  4. bulk-checkin: only support blobs in index_bulk_checkinEric W. Biederman, Sep 26, 2023
  5. Junio C HamanoSep 26, 2023
  6. Taylor BlauSep 27, 2023
  7. Junio C HamanoSep 27, 2023
  8. Taylor BlauSep 27, 2023
  9. Junio C HamanoSep 27, 2023
  10. Eric W. BiedermanSep 27, 2023
  11. Eric W. BiedermanSep 27, 2023
  12. Oswald BuddenhagenSep 28, 2023

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.