auto-git:
[change] main.js
This commit is contained in:
22
main.js
22
main.js
@@ -965,28 +965,6 @@ async function rewordCommitsSequentially(repoPath, commitMessageMap, hashes) {
|
|||||||
const commitMsg = msg.replace(/(["$`\\])/g, '\\$1');
|
const commitMsg = msg.replace(/(["$`\\])/g, '\\$1');
|
||||||
const sequenceEditor = `sed -i '' '1s/pick/reword/'`;
|
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!');
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user