News for hackers. Stuff that matters.
Re: by Hendrikto on Saturday August 05, 2023 @11:15AM (#37012822)
> One of the biggest issue with git is that it uses both the snapshot model and the diff/patch model

Git always uses snapshots. The diff thing is just a question of how this is exposed in the UI.

Re: by goku12 on Saturday August 05, 2023 @01:10PM (#37014171)
The tree state is saved as snapshots. However, operations like merging (3-way merge) and rebase are certainly based on diffs/patches.

For example, consider the case of an interactive rebase where you delete a commit. If it was based on snapshots, only that commit should disappear. The changes introduced by that commit should remain in the subsequent snapshots/commits. However, that is not what happens. The change introduced by the commit disappears from all subsequent commits/snapshots. This means that all the subsequent snapshots are modified by subtracting the patch from the commit that was deleted.