Skip to content

Commit 5af64d8

Browse files
committed
fix: ensure to always run stage
1 parent 398ef84 commit 5af64d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/features/gitMisc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { getGitActiveRepoOrThrow } from '../git-api'
44

55
export default () => {
66
registerExtensionCommand('fixedGitStageFile', async () => {
7+
await vscode.commands.executeCommand('git.stage')
78
const repo = getGitActiveRepoOrThrow()
89
if (!repo) return
910
const currentUrl = vscode.window.activeTextEditor?.document.uri
1011
if (!currentUrl) return
11-
await vscode.commands.executeCommand('git.stage')
1212
if ([...repo.state.indexChanges, ...repo.state.workingTreeChanges, ...repo.state.mergeChanges].some(x => x.uri.fsPath === currentUrl.fsPath)) {
1313
return
1414
}

0 commit comments

Comments
 (0)