From 088cf5a4bb322a9566382589c73634b6e778c81e Mon Sep 17 00:00:00 2001 From: Caleb Owens Date: Sat, 17 Feb 2024 12:17:56 +0000 Subject: [PATCH] Only show "Force push to remote" when pushing zero commits to a branch --- .../src/lib/components/CommitListFooter.svelte | 4 ++-- .../src/lib/components/PushButton.svelte | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/gitbutler-ui/src/lib/components/CommitListFooter.svelte b/gitbutler-ui/src/lib/components/CommitListFooter.svelte index e94505582..c46567af4 100644 --- a/gitbutler-ui/src/lib/components/CommitListFooter.svelte +++ b/gitbutler-ui/src/lib/components/CommitListFooter.svelte @@ -75,9 +75,9 @@ { diff --git a/gitbutler-ui/src/lib/components/PushButton.svelte b/gitbutler-ui/src/lib/components/PushButton.svelte index c9ffd75ef..4a5c3a8b1 100644 --- a/gitbutler-ui/src/lib/components/PushButton.svelte +++ b/gitbutler-ui/src/lib/components/PushButton.svelte @@ -8,6 +8,7 @@ -{#if isPr && !isPushed} +{#if (isPr || commits.length === 0) && !isPushed}