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

Re: Suggestion on hashing

From
BZBill Zaumen <bill.zaumen@gmail.com>
Date
Dec 7, 2011, 01:44 UTC
Message-ID
<1323222276.1705.434.camel@yos>
In-Reply-To
<CACsJy8CXkz-W3Z3pX-C-+fjLz=WahBajE2uLEG-f3gG_svEhug@mail.gmail.com>
On Tue, 2011-12-06 at 13:23 +0700, Nguyen Thai Ngoc Duy wrote:
> On Tue, Dec 6, 2011 at 1:02 PM, Bill Zaumen <bill.zaumen@gmail.com> wrote:
Show 12 quoted lines
> > If you are replacing SHA-1 as an object ID with another hash function,
> > two things to watch are submodules and alternative object databases.
> > Because of those, it is necessary to worry about the order in which
> > repositories are converted.  In the worst case for submodules, you'd
> > have to do multiple repositories at the same time, switching between
> > them depending on what you need at each point.
> 
> I know migration would be painful. But note that new repos can benefit
> stronger digest without legacy (of course until it links to an old
> repo). For submodules, I think we should extend it to become something
> similar to soft-link: git link is an SHA-1 to a text file that
> contains SHA-1 and maybe other digests of the submodule's tip.

Repositories would need to store a table mapping old SHA-1 values to the new ones (for commits). There's nothing in a repository to reliably indicate that it is being used as a submodule, and the choice of submodules can vary from commit to commit, making it difficult to control the order in which objects have their hashes updated. In some corner cases, you could have two branches in each of two repositories with different choices as to which is a submodule of which, although I'd be surprised if anyone actually did that.

Aside from that, in some corporate environments, the IT departments want to determine the release schedule for applications, and would take a dim view of changes that could not be tested first without being widely deployed. You could end up making Git unacceptable for those departments if you do not maintain backwards compatibility with existing repositories.

Previous: Nguyen Thai Ngoc DuyNext: Jeff King
Message 9 of 14 in “Re: Suggestion on hashing”
  1. Nguyen Thai Ngoc DuyDec 2, 2011
  2. Jeff KingDec 2, 2011
  3. Bill ZaumenDec 3, 2011
  4. Chris West (Faux)Dec 6, 2011
  5. Bill ZaumenDec 6, 2011
  6. Nguyen Thai Ngoc DuyDec 6, 2011
  7. Bill ZaumenDec 6, 2011
  8. Nguyen Thai Ngoc DuyDec 6, 2011
  9. Bill ZaumenDec 7, 2011
  10. Jeff KingDec 2, 2011
  11. Bill ZaumenDec 3, 2011
  12. Jeff KingDec 3, 2011
  13. Philip OakleyDec 3, 2011
  14. Bill ZaumenDec 3, 2011

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.