From f448132521bd63c1b56ed3e85a3915e9c9b80d87 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 23 May 2025 22:44:47 +0200 Subject: [PATCH] [auto] change main.js --- main.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/main.js b/main.js index c8fef7b..e2bba77 100644 --- a/main.js +++ b/main.js @@ -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}`); }