mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Git - remove the commitInProgress context for the commit message commands (#172761)
This commit is contained in:
@@ -1653,12 +1653,12 @@
|
||||
{
|
||||
"command": "git.commitMessageAccept",
|
||||
"group": "navigation",
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && editorLangId == git-commit && commitInProgress"
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && editorLangId == git-commit"
|
||||
},
|
||||
{
|
||||
"command": "git.commitMessageDiscard",
|
||||
"group": "navigation",
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && editorLangId == git-commit && commitInProgress"
|
||||
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && editorLangId == git-commit"
|
||||
},
|
||||
{
|
||||
"command": "git.stageSelectedRanges",
|
||||
|
||||
@@ -18,7 +18,6 @@ import { IPushErrorHandlerRegistry } from './pushError';
|
||||
import { ApiRepository } from './api/api1';
|
||||
import { IRemoteSourcePublisherRegistry } from './remotePublisher';
|
||||
import { IPostCommitCommandsProviderRegistry } from './postCommitCommands';
|
||||
import { OperationKind } from './operation';
|
||||
|
||||
class RepositoryPick implements QuickPickItem {
|
||||
@memoize get label(): string {
|
||||
@@ -588,19 +587,13 @@ export class Model implements IRemoteSourcePublisherRegistry, IPostCommitCommand
|
||||
checkForSubmodules();
|
||||
|
||||
const updateOperationInProgressContext = () => {
|
||||
let commitInProgress = false;
|
||||
let operationInProgress = false;
|
||||
for (const { repository } of this.openRepositories.values()) {
|
||||
if (repository.operations.isRunning(OperationKind.Commit)) {
|
||||
commitInProgress = true;
|
||||
}
|
||||
|
||||
if (repository.operations.shouldDisableCommands()) {
|
||||
operationInProgress = true;
|
||||
}
|
||||
}
|
||||
|
||||
commands.executeCommand('setContext', 'commitInProgress', commitInProgress);
|
||||
commands.executeCommand('setContext', 'operationInProgress', operationInProgress);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user