|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information. |
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | | -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'; |
| 6 | +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'; |
7 | 7 | import { Repository as BaseRepository, Commit, Stash, GitError, Submodule, CommitOptions, ForcePushMode } from './git'; |
8 | 8 | import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent, combinedDisposable } from './util'; |
9 | 9 | import { memoize, throttle, debounce } from './decorators'; |
@@ -633,7 +633,6 @@ export class Repository implements Disposable { |
633 | 633 |
|
634 | 634 | private isRepositoryHuge = false; |
635 | 635 | private didWarnAboutLimit = false; |
636 | | - private isFreshRepository: boolean | undefined = undefined; |
637 | 636 |
|
638 | 637 | private disposables: Disposable[] = []; |
639 | 638 |
|
@@ -1507,15 +1506,6 @@ export class Repository implements Disposable { |
1507 | 1506 | // set count badge |
1508 | 1507 | this.setCountBadge(); |
1509 | 1508 |
|
1510 | | - // Disable `Discard All Changes` for "fresh" repositories |
1511 | | - // https://github.com/Microsoft/vscode/issues/43066 |
1512 | | - const isFreshRepository = !this._HEAD || !this._HEAD.commit; |
1513 | | - |
1514 | | - if (this.isFreshRepository !== isFreshRepository) { |
1515 | | - commands.executeCommand('setContext', 'gitFreshRepository', isFreshRepository); |
1516 | | - this.isFreshRepository = isFreshRepository; |
1517 | | - } |
1518 | | - |
1519 | 1509 | this._onDidChangeStatus.fire(); |
1520 | 1510 | } |
1521 | 1511 |
|
|
0 commit comments