Describe the bug
The version command for the vaults can currently move to commit IDs that are expected to be discarded. When checked out at an earlier commit ID and a mutation is performed, we expect to discard the later commit IDs (respective to the earlier checked out commit) such that they are no longer valid and inaccessible.
To Reproduce
- Perform some commits on a vault to produce a commit log that appears like
c1 -> c2 -> c3
- Save the commit ID for
c3
- Use
version to move to c1: expected commit log now c1
- Perform another commit: expected commit log now
c1 -> c4
- Save the commit ID for
c4
- Use
version to move to c3 (with its old commit ID): commit log now back to c1 -> c2 -> c3
- Use version to move to
c4: commit log now back to c1 -> c4
Expected behavior
In step 5, instead of reverting to the earlier commit history, we would instead expect this to be an invalid operation. We want to restrict the "branching" potential for our vault log (for simplicity purposes), such that any mutations performed on a vault when checked out at an earlier commit will discard all commits later than the current one.
Additional context
Describe the bug
The
versioncommand for the vaults can currently move to commit IDs that are expected to be discarded. When checked out at an earlier commit ID and a mutation is performed, we expect to discard the later commit IDs (respective to the earlier checked out commit) such that they are no longer valid and inaccessible.To Reproduce
c1 -> c2 -> c3c3versionto move toc1: expected commit log nowc1c1 -> c4c4versionto move toc3(with its old commit ID): commit log now back toc1 -> c2 -> c3c4: commit log now back toc1 -> c4Expected behavior
In step 5, instead of reverting to the earlier commit history, we would instead expect this to be an invalid operation. We want to restrict the "branching" potential for our vault log (for simplicity purposes), such that any mutations performed on a vault when checked out at an earlier commit will discard all commits later than the current one.
Additional context
versioncommand https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/205#note_688569888