Branch support #7
Loading…
Reference in New Issue
No description provided.
Delete Branch "branch-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #6.
Implements branch support by only extending the existing functionality. Note that the existing functionality DOES NOT implement a
parent
pointer for commits, and as a result branches are also implemented differently to how git implements them.git branches are simply a named pointer to a commit object (which then has a pointer to its parent commit), here branches store the entire sequence of pointers to commit objects.
Why different to git?
I made a mistake in the initial implementation by using a
TreeSet
instead of manually implementing a tree for commits. This allowed the ability to insert commits in-between other commits, which isn't normally possible ingit
without rebasing which changes commits' hashes.The specification for this feature stated:
And so since I cannot remove this functionality any more, I have to build on top of it.