mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Git - Commit action button fix (#199475)
This commit is contained in:
@@ -219,6 +219,16 @@ export class CommitActionButton extends AbstractActionButton {
|
||||
};
|
||||
}
|
||||
|
||||
// Not a branch (tag, detached)
|
||||
if (this.state.HEAD?.type === RefType.Tag || !this.state.HEAD?.name) {
|
||||
return {
|
||||
command: 'git.commit',
|
||||
title: l10n.t('{0} Commit', '$(check)'),
|
||||
tooltip: this.state.isCommitInProgress ? l10n.t('Committing Changes...') : l10n.t('Commit Changes'),
|
||||
arguments: [this.repository.sourceControl, '']
|
||||
};
|
||||
}
|
||||
|
||||
// Commit
|
||||
return this.postCommitCommandCenter.getPrimaryCommand();
|
||||
}
|
||||
@@ -229,6 +239,11 @@ export class CommitActionButton extends AbstractActionButton {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Not a branch (tag, detached)
|
||||
if (this.state.HEAD?.type === RefType.Tag || !this.state.HEAD?.name) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Commit
|
||||
const commandGroups: Command[][] = [];
|
||||
for (const commands of this.postCommitCommandCenter.getSecondaryCommands()) {
|
||||
|
||||
Reference in New Issue
Block a user