4 ms·
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
by goku12 3y ago
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.