Branch support #7

Merged
cyclane merged 1 commits from branch-support into main 2024-01-10 12:21:26 +00:00
Owner

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 in git without rebasing which changes commits' hashes.

The specification for this feature stated:

All functionality that is implemented already should be preserved.

And so since I cannot remove this functionality any more, I have to build on top of it.

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 in `git` _without rebasing which changes commits' hashes_. The specification for this feature stated: > All functionality that is implemented already should be preserved. And so since I cannot remove this functionality any more, I have to build on top of it.
cyclane added 1 commit 2024-01-10 12:15:21 +00:00
Test Workflow / Lint and test library (pull_request) Successful in 1m55s Details
8352c3c9be
Implement branches + tests
cyclane merged commit dbc1bdd105 into main 2024-01-10 12:21:26 +00:00
cyclane deleted branch branch-support 2024-01-10 12:21:26 +00:00
cyclane referenced this issue from a commit 2024-01-10 12:21:27 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cyclane/teamcity-gitea-test-task#7
No description provided.