From d0ecf32e8191656f623f1061c6921a0beb855b27 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 1 Jun 2025 09:46:53 +0200 Subject: [PATCH] auto-git: [change] main.js --- main.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/main.js b/main.js index cd30fc8..972e978 100644 --- a/main.js +++ b/main.js @@ -965,6 +965,28 @@ async function rewordCommitsSequentially(repoPath, commitMessageMap, hashes) { const commitMsg = msg.replace(/(["$`\\])/g, '\\$1'); const sequenceEditor = `sed -i '' '1s/pick/reword/'`; + // await auf Promise – aber OHNE zweiten for! + await new Promise((resolve, reject) => { + const proc = spawn('git', [ + 'rebase', '--continue', '-i', `${hash}^` + ], { + cwd: repoPath, + env: { + ...process.env, + GIT_SEQUENCE_EDITOR: sequenceEditor, + GIT_EDITOR: `echo "${commitMsg}" >` + }, + stdio: 'inherit' + }); + proc.on('exit', code => code === 0 ? resolve() : reject(new Error(`Failed to reword ${hash}`))); + }); + console.log(`[AutoGit] Reworded commit ${hash} ✔`); + } + console.log('[AutoGit] All specified commit messages updated!'); +} +/* + +