5 ms·
I’m not known with the internal data structure of git, but couldn’t you add the new hash as a commit in a new format “on the side”, leaving the original commit
by arve0 7y ago
I’m not known with the internal data structure of git, but couldn’t you add the new hash as a commit in a new format “on the side”, leaving the original commit as is?
- WorldMaker 7y agoGit does have an commit-related object called a note that you can attach as a separate object. [1] Presumably the proposed "hash translation store" could use an approach similar to notes, and include the hash translations as objects in the git database (hopefully in a way that could be signed by a tag). [1] http://alblue.bandlem.com/2011/11/git-tip-of-week-git-notes.html http://alblue.bandlem.com/2011/11/git-tip-of-week-git-notes....
- loeg 7y agoThis is kind of what rewriting the repo is. Yes, you could leave the SHA1 commit tree around afterwards (i.e., for convenience of existing URLs), but you wouldn't want to keep SHA1 around as the authoritative hashname.