Adds ability to suppress most warning messages

This commit is contained in:
Eric Amodio
2017-06-09 15:38:43 -04:00
parent 30bb4398a3
commit 9ae4cc36a1
28 changed files with 241 additions and 106 deletions

View File

@@ -3,6 +3,7 @@ import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vsco
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { DiffWithWorkingCommandArgs } from './diffWithWorking';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Messages } from '../messages';
import { Logger } from '../logger';
export interface DiffLineWithWorkingCommandArgs {
@@ -32,7 +33,7 @@ export class DiffLineWithWorkingCommand extends ActiveEditorCommand {
try {
const blame = await this.git.getBlameForLine(gitUri, blameline);
if (blame === undefined) return window.showWarningMessage(`Unable to open compare. File is probably not under source control`);
if (blame === undefined) return Messages.showFileNotUnderSourceControlWarningMessage('Unable to open compare');
args.commit = blame.commit;
// If the line is uncommitted, find the previous commit