mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-13 03:28:35 -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 { GitCommit, GitService, GitUri } from '../gitService';
|
||||
import { Logger } from '../logger';
|
||||
import { Messages } from '../messages';
|
||||
import * as path from 'path';
|
||||
|
||||
export interface DiffWithWorkingCommandArgs {
|
||||
@@ -31,7 +32,7 @@ export class DiffWithWorkingCommand extends ActiveEditorCommand {
|
||||
|
||||
try {
|
||||
args.commit = await this.git.getLogCommit(gitUri.repoPath, gitUri.fsPath, gitUri.sha, { firstIfMissing: true });
|
||||
if (args.commit === undefined) return window.showWarningMessage(`Unable to open compare. File is probably not under source control`);
|
||||
if (args.commit === undefined) return Messages.showFileNotUnderSourceControlWarningMessage('Unable to open compare');
|
||||
}
|
||||
catch (ex) {
|
||||
Logger.error(ex, 'DiffWithWorkingCommand', `getLogCommit(${gitUri.repoPath}, ${gitUri.fsPath}, ${gitUri.sha})`);
|
||||
|
||||
Reference in New Issue
Block a user