mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { Uri, commands, scm, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState } from 'vscode';
|
||||
import { Ref, RefType, Git } from './git';
|
||||
import { Ref, RefType, Git, GitErrorCodes } from './git';
|
||||
import { Model, Resource, Status, CommitOptions, WorkingTreeGroup, IndexGroup, MergeGroup } from './model';
|
||||
import { toGitUri, fromGitUri } from './uri';
|
||||
import { applyLineChanges, intersectDiffWithRange, toLineRanges, invertLineChange } from './staging';
|
||||
@@ -801,9 +801,12 @@ export class CommandCenter {
|
||||
let message: string;
|
||||
|
||||
switch (err.gitErrorCode) {
|
||||
case 'DirtyWorkTree':
|
||||
case GitErrorCodes.DirtyWorkTree:
|
||||
message = localize('clean repo', "Please clean your repository working tree before checkout.");
|
||||
break;
|
||||
case GitErrorCodes.PushRejected:
|
||||
message = localize('cant push', "Can't push refs to remote. Run 'Pull' first to integrate your changes.");
|
||||
break;
|
||||
default:
|
||||
const hint = (err.stderr || err.message || String(err))
|
||||
.replace(/^error: /mi, '')
|
||||
|
||||
Reference in New Issue
Block a user