aboutsummaryrefslogtreecommitdiffstats
path: root/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch
blob: b90d0c7603581bfb214ee4f8918be8422204e0a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 917df10a7d166fdfb4479ee28c40cb884bfc37dc Mon Sep 17 00:00:00 2001
From: 1024x2 <2pow11@gmail.com>
Date: Wed, 11 Oct 2023 15:55:03 +0100
Subject: [PATCH 4/5] Updater: don't prompt for updates when on a local branch

---
 src/main/updater/git.ts | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/main/updater/git.ts b/src/main/updater/git.ts
index 2ff3ba5..21f33d1 100644
--- a/src/main/updater/git.ts
+++ b/src/main/updater/git.ts
@@ -49,9 +49,7 @@ async function getRepo() {
 async function calculateGitChanges() {
     await git("fetch");
 
-    const branch = await git("branch", "--show-current");
-
-    const res = await git("log", `HEAD...origin/${branch.stdout.trim()}`, "--pretty=format:%an/%h/%s");
+    const res = await git("log", "HEAD...@{u}", "--pretty=format:%an/%h/%s");
 
     const commits = res.stdout.trim();
     return commits ? commits.split("\n").map(line => {
-- 
2.43.1