mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-01 01:25:44 -05:00
Adds ability to suppress most warning messages
This commit is contained in:
@@ -4,6 +4,7 @@ import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
||||
import { BuiltInCommands } from '../constants';
|
||||
import { GitService, GitUri } from '../gitService';
|
||||
import { Logger } from '../logger';
|
||||
import { Messages } from '../messages';
|
||||
import { BranchesQuickPick, CommandQuickPickItem } from '../quickPicks';
|
||||
import * as path from 'path';
|
||||
|
||||
@@ -27,7 +28,7 @@ export class DiffWithBranchCommand extends ActiveEditorCommand {
|
||||
args.line = args.line || (editor === undefined ? 0 : editor.selection.active.line);
|
||||
|
||||
const gitUri = await GitUri.fromUri(uri, this.git);
|
||||
if (!gitUri.repoPath) return window.showWarningMessage(`Unable to open branch compare`);
|
||||
if (!gitUri.repoPath) return Messages.showNoRepositoryWarningMessage(`Unable to open branch compare`);
|
||||
|
||||
const branches = await this.git.getBranches(gitUri.repoPath);
|
||||
const pick = await BranchesQuickPick.show(branches, `Compare ${path.basename(gitUri.fsPath)} to \u2026`, args.goBackCommand);
|
||||
|
||||
Reference in New Issue
Block a user