1
0

Skip auto-commit if rewrite/rebase is in progress for the folder

This commit is contained in:
Victor Giers
2025-12-07 23:11:09 +01:00
parent 938e7e151c
commit 9cf980a3c3

11
main.js
View File

@@ -1364,7 +1364,16 @@ async function autoCommit(folderPath, message, win) {
const git = simpleGit(folderPath);
// If a previous rebase (likely from commit rewrite) is still open, abort it so auto-commit can proceed.
// Skip auto-commit if a rewrite/rebase is in progress for this folder
const foldersState = store.get('folders') || [];
const idxState = foldersState.findIndex(f => f.path === folderPath);
const rewriteActive = idxState !== -1 ? !!foldersState[idxState].rewriteInProgress : false;
if (rewriteActive) {
debug(`[autoCommit] Rewrite in progress for ${folderPath}, skipping auto-commit.`);
return false;
}
// If a previous rebase (not from our rewrite) is still open, abort it so auto-commit can proceed.
if (isRebaseInProgress(folderPath)) {
try {
debug(`[autoCommit] Rebase detected in ${folderPath}, aborting to unblock auto-commit.`);