Skip to content

Commit 523a9c9

Browse files
authored
fix: remove updateConfiguration command (#151)
1 parent 2e80397 commit 523a9c9

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/extension.ts

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,40 +19,6 @@ export function activate(context: sourcegraph.ExtensionContext): void {
1919
const configurationChanges = new BehaviorSubject<void>(undefined)
2020
context.subscriptions.add(sourcegraph.configuration.subscribe(() => configurationChanges.next(undefined)))
2121

22-
// Backcompat: Set 'git.blame.decorations' based on previous settings values
23-
;(async () => {
24-
try {
25-
const settings = sourcegraph.configuration.get<Settings>().value
26-
const initialDecorations = settings['git.blame.decorations']
27-
if (!initialDecorations) {
28-
if (settings['git.blame.lineDecorations'] === false) {
29-
await sourcegraph.commands.executeCommand('updateConfiguration', ['git.blame.decorations'], 'none')
30-
} else if (settings['git.blame.lineDecorations'] === true) {
31-
if (settings['git.blame.decorateWholeFile']) {
32-
await sourcegraph.commands.executeCommand(
33-
'updateConfiguration',
34-
['git.blame.decorations'],
35-
'file'
36-
)
37-
} else {
38-
await sourcegraph.commands.executeCommand(
39-
'updateConfiguration',
40-
['git.blame.decorations'],
41-
'line'
42-
)
43-
}
44-
} else {
45-
// Default to 'line'
46-
await sourcegraph.commands.executeCommand('updateConfiguration', ['git.blame.decorations'], 'line')
47-
}
48-
}
49-
} catch {
50-
// noop
51-
}
52-
})().catch(() => {
53-
// noop
54-
})
55-
5622
if (sourcegraph.app.activeWindowChanges) {
5723
const selectionChanges = from(sourcegraph.app.activeWindowChanges).pipe(
5824
filter((window): window is Exclude<typeof window, undefined> => window !== undefined),

0 commit comments

Comments
 (0)