This commit is contained in:
di-sukharev
2023-05-21 12:12:27 +08:00
parent f506c1287c
commit 3c9aabd239
2 changed files with 10 additions and 10 deletions

View File

@@ -27291,15 +27291,15 @@ async function improveCommitMessagesWithRebase({
(0, import_fs2.writeFileSync)(
`./rebase-exec.sh`,
`
#!/bin/bash
count=$(cat count.txt)
git commit --amend -F commit-$count.txt
echo $(( count + 1 )) > count.txt
#!/bin/bash
count=$(cat count.txt)
git commit --amend -F commit-$count.txt
echo $(( count + 1 )) > count.txt
`
);
await import_exec.default.exec(`chmod +x ./rebase-exec.sh`);
await execPromise(
`git rebase ${commitsToImprove[0].sha}^ --exec "git commit --amend -F ./rebase-exec.sh"`,
`git rebase ${commitsToImprove[0].sha}^ --exec "./rebase-exec.sh"`,
{
env: {
GIT_SEQUENCE_EDITOR: 'sed -i -e "s/^pick/reword/g"',

View File

@@ -185,17 +185,17 @@ async function improveCommitMessagesWithRebase({
writeFileSync(
`./rebase-exec.sh`,
`
#!/bin/bash
count=$(cat count.txt)
git commit --amend -F commit-$count.txt
echo $(( count + 1 )) > count.txt
#!/bin/bash
count=$(cat count.txt)
git commit --amend -F commit-$count.txt
echo $(( count + 1 )) > count.txt
`
);
await exec.exec(`chmod +x ./rebase-exec.sh`);
await execPromise(
`git rebase ${commitsToImprove[0].sha}^ --exec "git commit --amend -F ./rebase-exec.sh"`,
`git rebase ${commitsToImprove[0].sha}^ --exec "./rebase-exec.sh"`,
{
env: {
GIT_SEQUENCE_EDITOR: 'sed -i -e "s/^pick/reword/g"',