mirror of
https://git.1024x2.xyz/1024x2/vexcord.git
synced 2025-04-19 13:06:31 +02:00
31 lines
1.0 KiB
Diff
31 lines
1.0 KiB
Diff
From 00aba2082b64d8f01ea796f1118030bd944ebcc6 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 | 7 +------
|
|
1 file changed, 1 insertion(+), 6 deletions(-)
|
|
|
|
diff --git a/src/main/updater/git.ts b/src/main/updater/git.ts
|
|
index 20a5d70..21f33d1 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.44.0
|
|
|