diff --git a/src/git/git-remote-helper.ts b/src/git/git-remote-helper.ts index f6afdef..8e2f343 100644 --- a/src/git/git-remote-helper.ts +++ b/src/git/git-remote-helper.ts @@ -177,7 +177,10 @@ const GitRemoteHelper = async ({ map(line => line.trimEnd()), scan( (acc, line) => { - log('Scanning #NH7FyX', JSON.stringify({ acc, line })); + // console.log('') + // console.error('====') + // console.error(line) + // log('Scanning #NH7FyX', JSON.stringify({ acc, line })); // If we emitted the last value, then we ignore all of the current lines // and start fresh on the next "batch" const linesWaitingToBeEmitted = acc.emit ? [] : acc.lines; diff --git a/src/git/git.ts b/src/git/git.ts index 6566643..82d3142 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -23,16 +23,16 @@ class Git { let refs = await this.get_refs(forPush) for (let ref of refs) { if (ref.ref == "HEAD") { - if (!forPush) outLines.push(`@${ref.sha} HEAD`) + if (!forPush) outLines.push(`@${ref.sha} HEAD\n`) } else { - outLines.push(`${ref.sha} ${ref.ref}`) + outLines.push(`${ref.sha} ${ref.ref}\n`) } this.refs.set(ref.ref, ref.sha) } log("outLines", outLines) - return outLines.join("\n") + "\n" + return outLines.join("") + "\n" } async do_fetch(refs: { ref: string; oid: string }[]) { @@ -50,7 +50,7 @@ class Git { if (ref.src == "") { this.storage.delete(ref.dst) } else { - outLines.push(await this.push(ref.src, ref.dst)) + outLines.push(await this.push(ref.src, ref.dst) + "\n") } } if (this.refs.size == 0) { @@ -59,7 +59,7 @@ class Git { await this.wirteRef(symbolicRef, "HEAD", true) } log("outLines", outLines) - return outLines.join("\n") + "\n\n" + return outLines.join("") + "\n\n" }