From 98d49af72899432657d24a7a82dd24ea13912576 Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 27 Oct 2023 09:07:50 -0400 Subject: [PATCH] Fix git updater for other branches (#1915) --- src/main/updater/git.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/updater/git.ts b/src/main/updater/git.ts index c6e5cc90..7f778594 100644 --- a/src/main/updater/git.ts +++ b/src/main/updater/git.ts @@ -49,7 +49,9 @@ async function getRepo() { async function calculateGitChanges() { await git("fetch"); - const res = await git("log", "HEAD...origin/main", "--pretty=format:%an/%h/%s"); + const branch = await git("branch", "--show-current"); + + const res = await git("log", `HEAD...origin/${branch}`, "--pretty=format:%an/%h/%s"); const commits = res.stdout.trim(); return commits ? commits.split("\n").map(line => {