here are some things I learned while writing this:
1. Commits can have "extra fields", for example a GPG signature
2. I always thought entries in a tree had 4 fields, but there are actually only 3 (file name, file type, and object ID)
3. Git sometimes prints out file types as a bit set (100644), but it's really more like an enum, since there are only 5 file types (regular file, executable file, symlink, directory, and gitlink)
(2/?)
@b0rk Hmm, are those extra fields stored in the commit itself or can arbitrary metadata be stored in Git?
For some context (and it might have been experimented on already), Mercurial has an extension called evolve that is providing "obsolescence markers", which are pushed (and pulled) in the remote repository. Those obsolescence markers let you know when a commit was rewritten in history, e.g. after a rebase or after modifying it, and this is used to automatically "evolve" a branch modified by your peers (and also for the server to forbid pushing outdated changes, like with force-with-lease).
I'm wondering if evolve could be ported to Git.
@Exagone313 they're in the commit so they're immutable
it looks like someone's tried to build "git evolve" before https://lwn.net/Articles/914041/