The role of the garbage collection command (gc) would be to confirm that the repository is not storing extraneous data. At first, this would mean two things:
-
Traversing backwards from all branch heads (and the stash head) marking commit hashes, and deleting all commits which are unreachable.
-
Also ensures that the diff-encoding rules are being followed (that all non-principal and non-initial commits are encoded as differences, that principal commits are properly placed, et cetera)
The role of the garbage collection command (
gc) would be to confirm that the repository is not storing extraneous data. At first, this would mean two things:Traversing backwards from all branch heads (and the stash head) marking commit hashes, and deleting all commits which are unreachable.
Also ensures that the diff-encoding rules are being followed (that all non-principal and non-initial commits are encoded as differences, that principal commits are properly placed, et cetera)