mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Git - Add the capability to "attach" state to operations (#169371)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import { Command, commands, Disposable, Event, EventEmitter, Memento, Uri, workspace, l10n } from 'vscode';
|
||||
import { PostCommitCommandsProvider } from './api/git';
|
||||
import { Operation, Repository } from './repository';
|
||||
import { OperationKind, Repository } from './repository';
|
||||
import { ApiRepository } from './api/api1';
|
||||
import { dispose } from './util';
|
||||
|
||||
@@ -28,7 +28,7 @@ export class GitPostCommitCommandsProvider implements PostCommitCommandsProvider
|
||||
|
||||
// Icon
|
||||
const repository = apiRepository.repository;
|
||||
const isCommitInProgress = repository.operations.isRunning(Operation.Commit) || repository.operations.isRunning(Operation.PostCommitCommand);
|
||||
const isCommitInProgress = repository.operations.isRunning(OperationKind.Commit) || repository.operations.isRunning(OperationKind.PostCommitCommand);
|
||||
const icon = isCommitInProgress ? '$(sync~spin)' : alwaysPrompt ? '$(lock)' : alwaysCommitToNewBranch ? '$(git-branch)' : undefined;
|
||||
|
||||
// Tooltip (default)
|
||||
@@ -178,7 +178,7 @@ export class CommitCommandsCenter {
|
||||
l10n.t('Commit Changes to New Branch');
|
||||
|
||||
// Tooltip (in progress)
|
||||
if (this.repository.operations.isRunning(Operation.Commit)) {
|
||||
if (this.repository.operations.isRunning(OperationKind.Commit)) {
|
||||
tooltip = !alwaysCommitToNewBranch ?
|
||||
l10n.t('Committing Changes...') :
|
||||
l10n.t('Committing Changes to New Branch...');
|
||||
|
||||
Reference in New Issue
Block a user