aboutsummaryrefslogtreecommitdiffstats
path: root/vencord-patches/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch
diff options
context:
space:
mode:
author1024x22024-08-13 21:08:35 +0100
committer1024x22024-08-13 21:08:35 +0100
commitdf7d165228846d51beba93aaf133809d8f4824d4 (patch)
tree9546cfa515a19f03d95696fee7a59853df4b7b1c /vencord-patches/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch
parent81fbe676d788841cc8580815e2e2067759961fbe (diff)
Move patches into a folder
Diffstat (limited to 'vencord-patches/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch')
-rw-r--r--vencord-patches/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/vencord-patches/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch b/vencord-patches/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch
new file mode 100644
index 0000000..83bd402
--- /dev/null
+++ b/vencord-patches/0004-Updater-don-t-prompt-for-updates-when-on-a-local-bra.patch
@@ -0,0 +1,30 @@
+From 3bdfceda8ef7add84ddb39428c67e391d796c001 Mon Sep 17 00:00:00 2001
+From: 1024x2 <2pow11@gmail.com>
+Date: Sat, 9 Mar 2024 08:00:55 +0000
+Subject: [PATCH 4/8] Updater: don't prompt for updates when on a local branch
+
+---
+ src/main/updater/git.ts | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/src/main/updater/git.ts b/src/main/updater/git.ts
+index 1955f7dc..0226565e 100644
+--- a/src/main/updater/git.ts
++++ b/src/main/updater/git.ts
+@@ -49,12 +49,7 @@ async function getRepo() {
+ async function calculateGitChanges() {
+ await git("fetch");
+
+- const branch = (await git("branch", "--show-current")).stdout.trim();
+-
+- const existsOnOrigin = (await git("ls-remote", "origin", branch)).stdout.length > 0;
+- if (!existsOnOrigin) return [];
+-
+- const res = await git("log", `HEAD...origin/${branch}`, "--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.45.2
+