Specification
The usage of withF and withG presents us a new API for VaultInternal mutation and reading:
VaultInternal.readF
VaultInternal.readG
VaultInternal.writeF
VaultInternal.writeG
Make sure to check the remote before writing anything.
You also need to test what happens if the vault were to be checked out to a previous version, and is also considered a remote vault, does that mean pulling fails? If so, we can make it work, by temporarily checking out to the branch pointer, and completing the pull.
Make sure to use the dirty boolean to indicate dirty writing in the middle of writeFand writeG.
When performing operations with a vault, expect to pass a callback that receives the vault. I would want to align the API between NodeConnectionManager and VaultManager. This requires further specification.
As discussed HEAD and MASTER will separately point to the same commit. When we commit using the ref: 'HEAD the HEAD will be moved but the MASTER will remain in place. The MASTER will need to be updated using git.writeRef.
When handling a commit in from previous history we need to check if the HEAD points to the same commit as MASTER using git.resolveRef. If they are different commits then it is a branching commit from the history. In this case we do the commit and update master to the resulting ref using git.writeRef. The old commits between the branching point and the old master ref are deleted.
When we create a new vault we need to check for dirty state. If the dirty flag is set in the metadata we need to checkout the ref that master points to and run a global GC operation. We need to iterate over all commits and check if they are part of the master commit chain.
Additional context
Tasks
Specification
The usage of
withFandwithGpresents us a new API forVaultInternalmutation and reading:Make sure to check the
remotebefore writing anything.You also need to test what happens if the vault were to be checked out to a previous version, and is also considered a remote vault, does that mean pulling fails? If so, we can make it work, by temporarily checking out to the branch pointer, and completing the pull.
Make sure to use the
dirtyboolean to indicate dirty writing in the middle ofwriteFandwriteG.When performing operations with a vault, expect to pass a callback that receives the vault. I would want to align the API between
NodeConnectionManagerandVaultManager. This requires further specification.As discussed
HEADandMASTERwill separately point to the same commit. When we commit using theref: 'HEADtheHEADwill be moved but theMASTERwill remain in place. TheMASTERwill need to be updated usinggit.writeRef.When handling a commit in from previous history we need to check if the
HEADpoints to the same commit asMASTERusinggit.resolveRef. If they are different commits then it is a branching commit from the history. In this case we do the commit and update master to the resulting ref usinggit.writeRef. The old commits between the branching point and the old master ref are deleted.When we create a new vault we need to check for dirty state. If the dirty flag is set in the metadata we need to checkout the ref that master points to and run a global GC operation. We need to iterate over all commits and check if they are part of the master commit chain.
Additional context
VaultInternal#305version#252 commentary.Tasks
VaultInternalto usereadF/GandwriteF/G.booleanmetadata field.7. Look into aligning API betweenNodeConnectionManagerandVaultManager. seperate issue? this issue isVaultInternalscope and this task seems to beVaultManagerscope.