|
2 | 2 | import HunkViewer from '$components/HunkViewer.svelte';
|
3 | 3 | import InfoMessage from '$components/InfoMessage.svelte';
|
4 | 4 | import LargeDiffMessage from '$components/LargeDiffMessage.svelte';
|
5 |
| - import { getLocalCommits, getLocalAndRemoteCommits } from '$lib/commits/contexts'; |
6 | 5 | import { FileService } from '$lib/files/fileService';
|
7 | 6 | import { getLockText } from '$lib/files/lock';
|
8 | 7 | import { Project } from '$lib/project/project';
|
|
38 | 37 | let alwaysShow = $state(false);
|
39 | 38 | const project = getContext(Project);
|
40 | 39 | const fileService = getContext(FileService);
|
41 |
| - const localCommits = isFileLocked ? getLocalCommits() : undefined; |
42 |
| - const remoteCommits = isFileLocked ? getLocalAndRemoteCommits() : undefined; |
43 |
| -
|
44 |
| - const commits = isFileLocked ? ($localCommits || []).concat($remoteCommits || []) : undefined; |
45 | 40 |
|
46 | 41 | function getGutterMinWidth(max: number | undefined) {
|
47 | 42 | if (!max) {
|
|
124 | 119 | {#each sections as section}
|
125 | 120 | {@const { added, removed } = computeAddedRemovedByHunk(section)}
|
126 | 121 | {#if 'hunk' in section}
|
127 |
| - {@const isHunkLocked = section.hunk.lockedTo && section.hunk.lockedTo.length > 0 && commits} |
| 122 | + {@const isHunkLocked = section.hunk.lockedTo && section.hunk.lockedTo.length > 0} |
128 | 123 | <div class="hunk-wrapper">
|
129 | 124 | {#if isHunkLocked || section.hunk.poisoned}
|
130 | 125 | <div class="indicators text-11 text-semibold">
|
131 | 126 | {#if isHunkLocked}
|
132 | 127 | <InfoMessage filled outlined={false} style="warning" icon="locked">
|
133 | 128 | {#snippet content()}
|
134 |
| - {getLockText(section.hunk.lockedTo, commits)} |
| 129 | + {getLockText(section.hunk.lockedTo, [])} |
135 | 130 | {/snippet}
|
136 | 131 | </InfoMessage>
|
137 | 132 | {/if}
|
|
0 commit comments