bloppe 5 days ago

In the US, the commits (aka bills aka statutes) are the source of truth, but they're regularly compiled and codified into the US code [1] which is analogous to the tip of main. The code is a concise, organized, holistic representation of the statutes, but when people actually get into legal disputes, they have to go back to the original statutes to litigate it.

[1] https://en.m.wikipedia.org/wiki/United_States_Code

1
eru 5 days ago

Funny enough in git a 'commit' actually refers to the full state of the data in the repository (and zero or more pointers to parent commits).

When we do 'git show' we typically look the diff to the parent commit. But in git that's derived data. The 'snapshot' of your files is the fundamental point of view in git, and they are the source of truth (in some sense).

As you they, they make the diffs the source of truth in the US. I think that's how Subversion used to work. I don't know if that's still true, though.

The git model makes diffs between arbitrary commits about equally expensive to produce, no matter how far away in the commit graph they are from each other (if they are even connected at all). It also makes complicated merges conceptually simpler.