提交 14d47d35 编写于 作者: J Joao Moreno

fixes #79239

上级 6884154c
......@@ -469,11 +469,11 @@
},
{
"command": "git.clean",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && !gitFreshRepository"
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.cleanAll",
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && !gitFreshRepository"
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command": "git.commit",
......@@ -763,7 +763,7 @@
{
"command": "git.cleanAll",
"group": "5_stage",
"when": "scmProvider == git && !gitFreshRepository"
"when": "scmProvider == git"
},
{
"command": "git.stashIncludeUntracked",
......@@ -831,7 +831,7 @@
},
{
"command": "git.cleanAll",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "1_modification"
},
{
......@@ -841,7 +841,7 @@
},
{
"command": "git.cleanAll",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "inline"
},
{
......@@ -878,12 +878,12 @@
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "1_modification"
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "inline"
},
{
......@@ -980,12 +980,12 @@
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "1_modification"
},
{
"command": "git.clean",
"when": "scmProvider == git && scmResourceGroup == workingTree && !gitFreshRepository",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "inline"
},
{
......
......@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { commands, Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, SourceControlInputBoxValidation, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, Decoration, Memento, SourceControlInputBoxValidationType, OutputChannel, LogLevel, env, ProgressOptions, CancellationToken } from 'vscode';
import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, SourceControlInputBoxValidation, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, Decoration, Memento, SourceControlInputBoxValidationType, OutputChannel, LogLevel, env, ProgressOptions, CancellationToken } from 'vscode';
import { Repository as BaseRepository, Commit, Stash, GitError, Submodule, CommitOptions, ForcePushMode } from './git';
import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent, combinedDisposable } from './util';
import { memoize, throttle, debounce } from './decorators';
......@@ -633,7 +633,6 @@ export class Repository implements Disposable {
private isRepositoryHuge = false;
private didWarnAboutLimit = false;
private isFreshRepository: boolean | undefined = undefined;
private disposables: Disposable[] = [];
......@@ -1507,15 +1506,6 @@ export class Repository implements Disposable {
// set count badge
this.setCountBadge();
// Disable `Discard All Changes` for "fresh" repositories
// https://github.com/Microsoft/vscode/issues/43066
const isFreshRepository = !this._HEAD || !this._HEAD.commit;
if (this.isFreshRepository !== isFreshRepository) {
commands.executeCommand('setContext', 'gitFreshRepository', isFreshRepository);
this.isFreshRepository = isFreshRepository;
}
this._onDidChangeStatus.fire();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册