From 228e75039f8b0f0a91855538acd05d71bfefd9be Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 20 Mar 2026 08:48:46 +0100 Subject: [PATCH] Check for up-to-date status before setting update --- electron/main.cjs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/electron/main.cjs b/electron/main.cjs index 39fcf30..0779bc5 100644 --- a/electron/main.cjs +++ b/electron/main.cjs @@ -237,6 +237,18 @@ async function performUpdateCheck(trigger = 'manual') { const { stdout: updatedStdout } = await runGitCommand(['rev-parse', 'HEAD']) const updatedLocalCommit = updatedStdout.trim() + + if (!updatedLocalCommit || updatedLocalCommit === localCommit) { + return setUpdateStatus({ + state: 'up-to-date', + trigger, + branch: branch || UPDATE_BRANCH, + localCommit, + remoteCommit, + message: 'No newer remote update was applied. Local checkout already contains the latest pulled state.', + }) + } + const result = setUpdateStatus({ state: 'updated', trigger,