1
0

[auto] change main.js

This commit is contained in:
2025-05-23 22:44:47 +02:00
parent b41740568b
commit f448132521

13
main.js
View File

@@ -130,6 +130,19 @@ function startMonitoringWatcher(folderPath, win) {
win.webContents.send('repo-updated', folderPath);
});
// Initialer Commit, falls beim Start schon ungestagte Änderungen vorliegen
(async () => {
debug(`[MONITOR] Starte initialen Commit-Check für ${folderPath}`);
const did = await autoCommit(
folderPath,
'[auto] initial commit upon monitoring start'
);
if (did) {
win.webContents.send('repo-updated', folderPath);
debug(`[MONITOR] Initialer Auto-Commit für ${folderPath} durchgeführt.`);
}
})();
monitoringWatchers.set(folderPath, watcher);
debug(`[MONITOR] Watcher aktiv für ${folderPath}`);
}