Skip to content

Commit a5ebc6f

Browse files
committed
Streamline the commit process by automatically staging and proceeding when only a single file is unstaged
1 parent 6ff0636 commit a5ebc6f

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎packages/vscode/src/views/panel/backend/message-handlers/handle-commit-changes/handle-commit-changes.ts‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,14 @@ export const handle_commit_changes = async (
9898
path.relative(repository.rootUri.fsPath, change.uri.fsPath)
9999
)
100100

101-
provider.send_message({
102-
command: 'SHOW_STAGE_FILES_MODAL',
103-
files: unstaged_files
104-
})
101+
if (unstaged_files.length == 1) {
102+
await handle_proceed_with_commit(provider, unstaged_files)
103+
} else {
104+
provider.send_message({
105+
command: 'SHOW_STAGE_FILES_MODAL',
106+
files: unstaged_files
107+
})
108+
}
105109
} else {
106110
vscode.window.showInformationMessage(
107111
dictionary.information_message.NO_CHANGES_TO_COMMIT

0 commit comments

Comments
 (0)