TODO comments

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2024-01-18 11:26:52 +00:00
parent 1781ca2f99
commit 46081de3d5

View File

@@ -73,13 +73,27 @@ async function talkToGit (refs, drive) {
process.stdout.write('list\n')
process.stdout.write('push\n')
process.stdout.write('fetch\n\n')
} else if (chunk && chunk.search(/^push/) !== -1) {
} else if (chunk && chunk.search(/^push/) !== -1) {j
const [_command, path] = chunk.split(' ')
const [src, dst] = path.split(':')
const isDelete = !src
const isForce = src.startsWith('+')
// TODO: options:
// ---- push by pull ----
// - init for share (daemon, etc)
// - push branch to local remote
// - send rpc command to origin
// Mapping of RPC commands to git commands on origin:
// - normal push - git pull
// - force push - git reset --hard <remote>/<branch>
// - delete branch - git branch -D <remote>/<branch>
//
// ---- push by push ----
//
//
process.stdout.write('\n\n')
process.exit(0)
} else if (chunk && chunk.search(/^list/) !== -1) { // list && list for-push