Commit Graph

10 Commits

Author SHA1 Message Date
Gleb Koval a6d7802a83
Fix README and test for throws on branch not found.
Test Workflow / Lint and test library (push) Successful in 1m52s Details
2024-01-10 12:40:10 +00:00
Gleb Koval dbc1bdd105 Branch support (#7)
Test Workflow / Lint and test library (push) Successful in 1m51s Details
Publish Workflow / Publish library (push) Successful in 2m18s Details
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.

Reviewed-on: #7
2024-01-10 12:21:25 +00:00
Gleb Koval 7233a7e8d1
Cleanup and privatise commit comparator
Publish Workflow / Publish library (push) Successful in 8m28s Details
Test Workflow / Lint and test library (push) Successful in 16m51s Details
2023-12-05 02:00:35 +00:00
Gleb Koval 6cb4f82fce
Cleanup comments in README and Commit.kt
Test Workflow / Lint and test library (push) Successful in 16m49s Details
2023-12-02 20:51:34 +00:00
Gleb Koval 804778b0fc Improve README - usage (#5)
Publish Workflow / Publish library (push) Successful in 7m57s Details
Test Workflow / Lint and test library (push) Successful in 16m38s Details
Include instructions for usage of library in README, as well as how to view documentation.

Reviewed-on: #5
2023-12-02 03:50:13 +00:00
Gleb Koval 0e1afa6dc8 Implement toString() for objects (#4)
Test Workflow / Lint and test library (push) Successful in 17m4s Details
> Search for specific commit by hash or metadata and print its content.

To satisfy this final requirement, we need to have `toString()` implemented for version manager `Object`s which will allow them to be easily (and nicely) printed if needed (includes tests).

Reviewed-on: #4
2023-12-02 02:50:08 +00:00
Gleb Koval 14950b2f5f Documentation generation (Dokka HTML) (#3)
Publish Workflow / Publish library (push) Successful in 8m18s Details
Test Workflow / Lint and test library (push) Successful in 17m2s Details
Generate documentation HTML and `javadoc.jar`.

Reviewed-on: #3
2023-12-02 02:05:55 +00:00
Gleb Koval 6d8c6008e1 Initial publish (#2)
Publish Workflow / Publish library (push) Successful in 8m4s Details
Test Workflow / Lint and test library (push) Successful in 18m47s Details
CI for publishing library to gitea packages on tag.

Reviewed-on: #2
2023-12-02 01:00:03 +00:00
Gleb Koval e2764a5473 Initial library implementations and tests (#1)
Main Workflow / Lint and test library (push) Successful in 16m40s Details
- [x] Implements library according to instructions, with tests.
- [x] GitHub Actions workflow to lint and test library.

Reviewed-on: #1
2023-12-01 20:42:07 +00:00
Gleb Koval d5ad54bea5
Initial commit 2023-11-30 23:46:20 +00:00