Parcourir la source

Fixes incorrect error messages

main
Eric Amodio il y a 6 ans
Parent
révision
90b5fdf1df
2 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. +1
    -1
      src/commands/diffWithBranch.ts
  2. +4
    -4
      src/commands/externalDiff.ts

+ 1
- 1
src/commands/diffWithBranch.ts Voir le fichier

@ -33,7 +33,7 @@ export class DiffWithBranchCommand extends ActiveEditorCommand {
}
const gitUri = await GitUri.fromUri(uri);
if (!gitUri.repoPath) return Messages.showNoRepositoryWarningMessage(`Unable to open branch compare`);
if (!gitUri.repoPath) return Messages.showNoRepositoryWarningMessage(`Unable to open file compare`);
const placeHolder = `Compare ${path.basename(gitUri.fsPath)} with ${GlyphChars.Ellipsis}`;
const progressCancellation = BranchesAndTagsQuickPick.showProgress(placeHolder);

+ 4
- 4
src/commands/externalDiff.ts Voir le fichier

@ -85,11 +85,11 @@ export class ExternalDiffCommand extends Command {
async execute(args: ExternalDiffCommandArgs = {}) {
try {
const repoPath = await Container.git.getRepoPath(undefined);
if (!repoPath) return Messages.showNoRepositoryWarningMessage(`Unable to open changed files`);
if (!repoPath) return Messages.showNoRepositoryWarningMessage(`Unable to open external file compare`);
const tool = await Container.git.getDiffTool(repoPath);
if (tool === undefined) {
const result = await window.showWarningMessage(`Unable to open file compare because there is no Git diff tool configured`, 'View Git Docs');
const result = await window.showWarningMessage(`Unable to open external file compare because there is no Git diff tool configured`, 'View Git Docs');
if (!result) return undefined;
return commands.executeCommand(BuiltInCommands.Open, Uri.parse('https://git-scm.com/docs/git-config#git-config-difftool'));
@ -97,7 +97,7 @@ export class ExternalDiffCommand extends Command {
if (args.files === undefined) {
const status = await Container.git.getStatusForRepo(repoPath);
if (status === undefined) return window.showWarningMessage(`Unable to open changed files`);
if (status === undefined) return window.showWarningMessage(`Unable to open external file compare`);
args.files = [];
@ -120,7 +120,7 @@ export class ExternalDiffCommand extends Command {
}
catch (ex) {
Logger.error(ex, 'ExternalDiffCommand');
return window.showErrorMessage(`Unable to open external diff. See output channel for more details`);
return window.showErrorMessage(`Unable to open external file compare. See output channel for more details`);
}
}
}

Chargement…
Annuler
Enregistrer