Skip to content

Commit b2817ab

Browse files
committed
Rename class VirtualBranch -> BranchStack
1 parent 8f294b5 commit b2817ab

30 files changed

+73
-74
lines changed

apps/desktop/src/lib/branch/ActiveBranchStatus.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { getNameNormalizationServiceContext } from '$lib/branches/nameNormalizationService';
33
import { getForge } from '$lib/forge/interface/forge';
44
import { openExternalUrl } from '$lib/utils/url';
5-
import { VirtualBranch } from '$lib/vbranches/types';
5+
import { BranchStack } from '$lib/vbranches/types';
66
import { getContextStore } from '@gitbutler/shared/context';
77
import Button from '@gitbutler/ui/Button.svelte';
88
@@ -18,7 +18,7 @@
1818
remoteExists: boolean;
1919
} = $props();
2020
21-
const branch = getContextStore(VirtualBranch);
21+
const branch = getContextStore(BranchStack);
2222
const upstreamName = $derived($branch.upstreamName);
2323
const forge = getForge();
2424
const forgeBranch = $derived(upstreamName ? $forge?.branch(upstreamName) : undefined);

apps/desktop/src/lib/branch/AddSeriesModal.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { error } from '$lib/utils/toasts';
33
import { openExternalUrl } from '$lib/utils/url';
44
import { BranchController } from '$lib/vbranches/branchController';
5-
import { VirtualBranch } from '$lib/vbranches/types';
5+
import { BranchStack } from '$lib/vbranches/types';
66
import { getContext, getContextStore } from '@gitbutler/shared/context';
77
import Button from '@gitbutler/ui/Button.svelte';
88
import LinkButton from '@gitbutler/ui/LinkButton.svelte';
@@ -22,7 +22,7 @@
2222
const { parentSeriesName }: Props = $props();
2323
2424
const branchController = getContext(BranchController);
25-
const branch = getContextStore(VirtualBranch);
25+
const branch = getContextStore(BranchStack);
2626
2727
let createRefModal = $state<ReturnType<typeof Modal>>();
2828
let createRefName: string | undefined = $state();

apps/desktop/src/lib/branch/BranchLane.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import Stack from '$lib/stack/Stack.svelte';
88
import { FileIdSelection } from '$lib/vbranches/fileIdSelection';
99
import { SelectedOwnership } from '$lib/vbranches/ownership';
10-
import { RemoteFile, VirtualBranch } from '$lib/vbranches/types';
10+
import { RemoteFile, BranchStack } from '$lib/vbranches/types';
1111
import {
1212
getContext,
1313
getContextStoreBySymbol,
@@ -20,10 +20,10 @@
2020
import { writable } from 'svelte/store';
2121
import { slide } from 'svelte/transition';
2222
23-
const { branch }: { branch: VirtualBranch } = $props();
23+
const { branch }: { branch: BranchStack } = $props();
2424
2525
// BRANCH
26-
const branchStore = createContextStore(VirtualBranch, branch);
26+
const branchStore = createContextStore(BranchStack, branch);
2727
const selectedOwnershipStore = createContextStore(
2828
SelectedOwnership,
2929
SelectedOwnership.fromBranch(branch)

apps/desktop/src/lib/branch/BranchLaneContextMenu.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { updatePrDescriptionTables } from '$lib/forge/shared/prFooter';
77
import { User } from '$lib/stores/user';
88
import { BranchController } from '$lib/vbranches/branchController';
9-
import { VirtualBranch } from '$lib/vbranches/types';
9+
import { BranchStack } from '$lib/vbranches/types';
1010
import { getContext, getContextStore } from '@gitbutler/shared/context';
1111
import Button from '@gitbutler/ui/Button.svelte';
1212
import Modal from '@gitbutler/ui/Modal.svelte';
@@ -27,7 +27,7 @@
2727
2828
let { contextMenuEl = $bindable(), trigger, onCollapse, ontoggle }: Props = $props();
2929
30-
const branchStore = getContextStore(VirtualBranch);
30+
const branchStore = getContextStore(BranchStack);
3131
const branchController = getContext(BranchController);
3232
const prService = getForgePrService();
3333
const user = getContextStore(User);

apps/desktop/src/lib/branch/Dropzones.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import { BranchDragActionsFactory } from '$lib/branches/dragActions';
33
import CardOverlay from '$lib/dropzone/CardOverlay.svelte';
44
import Dropzone from '$lib/dropzone/Dropzone.svelte';
5-
import { VirtualBranch } from '$lib/vbranches/types';
5+
import { BranchStack } from '$lib/vbranches/types';
66
import { getContext, getContextStore } from '@gitbutler/shared/context';
77
import type { Snippet } from 'svelte';
88
99
const branchDragActionsFactory = getContext(BranchDragActionsFactory);
10-
const branch = getContextStore(VirtualBranch);
10+
const branch = getContextStore(BranchStack);
1111
1212
interface Props {
1313
children: Snippet;

apps/desktop/src/lib/branch/SeriesHeader.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import { openExternalUrl } from '$lib/utils/url';
2525
import { BranchController } from '$lib/vbranches/branchController';
2626
import { listCommitFiles } from '$lib/vbranches/remoteCommits';
27-
import { PatchSeries, VirtualBranch, type CommitStatus } from '$lib/vbranches/types';
27+
import { PatchSeries, BranchStack, type CommitStatus } from '$lib/vbranches/types';
2828
import {
2929
allPreviousSeriesHavePrNumber,
3030
childBranch,
@@ -52,7 +52,7 @@
5252
const project = getContext(Project);
5353
const aiService = getContext(AIService);
5454
const promptService = getContext(PromptService);
55-
const stackStore = getContextStore(VirtualBranch);
55+
const stackStore = getContextStore(BranchStack);
5656
const stack = $derived($stackStore);
5757
5858
const parent = $derived(

apps/desktop/src/lib/branch/SeriesHeaderContextMenu.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { copyToClipboard } from '$lib/utils/clipboard';
99
import { openExternalUrl } from '$lib/utils/url';
1010
import { BranchController } from '$lib/vbranches/branchController';
11-
import { VirtualBranch, type CommitStatus } from '$lib/vbranches/types';
11+
import { BranchStack, type CommitStatus } from '$lib/vbranches/types';
1212
import { getContext, getContextStore } from '@gitbutler/shared/context';
1313
import Button from '@gitbutler/ui/Button.svelte';
1414
import Modal from '@gitbutler/ui/Modal.svelte';
@@ -61,7 +61,7 @@
6161
6262
const project = getContext(Project);
6363
const aiService = getContext(AIService);
64-
const branchStore = getContextStore(VirtualBranch);
64+
const branchStore = getContextStore(BranchStack);
6565
const branchController = getContext(BranchController);
6666
const aiGenEnabled = projectAiGenEnabled(project.id);
6767

apps/desktop/src/lib/branches/dragActions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { CommitDropData, HunkDropData, FileDropData } from '$lib/dragging/draggables';
22
import { filesToOwnership } from '$lib/vbranches/ownership';
3-
import { LocalFile, type VirtualBranch } from '$lib/vbranches/types';
3+
import { LocalFile, type BranchStack } from '$lib/vbranches/types';
44
import type { BranchController } from '$lib/vbranches/branchController';
55

66
class BranchDragActions {
77
constructor(
88
private branchController: BranchController,
9-
private branch: VirtualBranch
9+
private branch: BranchStack
1010
) {}
1111

1212
acceptMoveCommit(data: any) {
@@ -53,7 +53,7 @@ class BranchDragActions {
5353
export class BranchDragActionsFactory {
5454
constructor(private branchController: BranchController) {}
5555

56-
build(branch: VirtualBranch) {
56+
build(branch: BranchStack) {
5757
return new BranchDragActions(this.branchController, branch);
5858
}
5959
}

apps/desktop/src/lib/commit/CommitCard.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
DetailedCommit,
2121
PatchSeries,
2222
RemoteFile,
23-
VirtualBranch,
23+
BranchStack,
2424
type CommitStatus
2525
} from '$lib/vbranches/types';
2626
import { getContext, getContextStore, maybeGetContext } from '@gitbutler/shared/context';
@@ -37,7 +37,7 @@
3737
const user = userService.user;
3838
3939
interface Props {
40-
branch?: VirtualBranch | undefined;
40+
branch?: BranchStack | undefined;
4141
currentSeries?: PatchSeries | undefined;
4242
commit: DetailedCommit | Commit;
4343
commitUrl?: string | undefined;

apps/desktop/src/lib/commit/CommitContextMenu.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
import { copyToClipboard } from '$lib/utils/clipboard';
77
import { openExternalUrl } from '$lib/utils/url';
88
import { BranchController } from '$lib/vbranches/branchController';
9-
import { VirtualBranch, type Commit, type DetailedCommit } from '$lib/vbranches/types';
9+
import { BranchStack, type Commit, type DetailedCommit } from '$lib/vbranches/types';
1010
import { getContext } from '@gitbutler/shared/context';
1111
1212
interface Props {
1313
menu: ReturnType<typeof ContextMenu> | undefined;
1414
leftClickTrigger: HTMLElement | undefined;
1515
rightClickTrigger: HTMLElement | undefined;
1616
baseBranch: BaseBranch;
17-
branch: VirtualBranch | undefined;
17+
branch: BranchStack | undefined;
1818
commit: DetailedCommit | Commit;
1919
commitUrl: string | undefined;
2020
isRemote: boolean;

0 commit comments

Comments
 (0)