From b834a6ef019dd0c6627da132fab41cd2289c091b Mon Sep 17 00:00:00 2001 From: Nikita Galaiko Date: Wed, 11 Oct 2023 14:46:00 +0200 Subject: [PATCH] say force push if it's going to happen --- packages/ui/src/lib/vbranches/types.ts | 1 + packages/ui/src/routes/repo/[projectId]/BranchLane.svelte | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/lib/vbranches/types.ts b/packages/ui/src/lib/vbranches/types.ts index 37e294c67..ff32af306 100644 --- a/packages/ui/src/lib/vbranches/types.ts +++ b/packages/ui/src/lib/vbranches/types.ts @@ -37,6 +37,7 @@ export class Branch { files!: File[]; @Type(() => Commit) commits!: Commit[]; + requiresForce!: boolean; description!: string; order!: number; upstream?: string; diff --git a/packages/ui/src/routes/repo/[projectId]/BranchLane.svelte b/packages/ui/src/routes/repo/[projectId]/BranchLane.svelte index 797ef83f0..264b754e0 100644 --- a/packages/ui/src/routes/repo/[projectId]/BranchLane.svelte +++ b/packages/ui/src/routes/repo/[projectId]/BranchLane.svelte @@ -545,7 +545,11 @@ loading={isPushing} on:click={push} > - Push + {#if branch.requiresForce} + Force Push + {:else} + Push + {/if} @@ -615,7 +619,7 @@ {#if commit.id === headCommit?.id}