File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as vscode from 'vscode' ;
22import * as path from 'node:path' ;
33import { GitCryptDetector } from './detector.js' ;
4- import { encodeGitCryptUri , GIT_CRYPT_SCHEME } from './uriUtil.js' ;
4+ import { encodeGitCryptUri } from './uriUtil.js' ;
55
66export async function showDiff (
77 detector : GitCryptDetector ,
@@ -15,15 +15,16 @@ export async function showDiff(
1515 }
1616
1717 if ( ! fileUri || fileUri . scheme !== 'file' ) {
18- vscode . window . showWarningMessage ( 'Git Crypt : No file selected' ) ;
18+ vscode . window . showWarningMessage ( 'git-crypt Diff : No file selected' ) ;
1919 return ;
2020 }
2121
2222 const absolutePath = fileUri . fsPath ;
2323 const match = detector . findRepoAndRelPath ( absolutePath ) ;
2424
2525 if ( ! match ) {
26- vscode . window . showWarningMessage ( 'Git Crypt: This file is not managed by git-crypt' ) ;
26+ // Not a git-crypt file -- fall through to the built-in git diff
27+ await vscode . commands . executeCommand ( 'git.openChange' , fileUri ) ;
2728 return ;
2829 }
2930
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { resolveContent } from './contentProvider.js';
55import { GIT_CRYPT_SCHEME } from './uriUtil.js' ;
66import { registerDiffCommand } from './diff.js' ;
77
8- const log = vscode . window . createOutputChannel ( 'Git Crypt ' ) ;
8+ const log = vscode . window . createOutputChannel ( 'git-crypt Diff ' ) ;
99
1010class GitCryptDecorationProvider implements vscode . FileDecorationProvider {
1111 private _onDidChange = new vscode . EventEmitter < vscode . Uri | vscode . Uri [ ] > ( ) ;
You can’t perform that action at this time.
0 commit comments