File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,17 @@ import { GitUri, isGitUri } from './gitUri';
44
55export async function ensureWorkingUri ( container : Container , uri : Uri | undefined ) : Promise < Uri | undefined > {
66 if ( uri == null ) return undefined ;
7+ if ( ! container . git . isTrackable ( uri ) ) return undefined ;
78
89 const gitUri = ! isGitUri ( uri ) ? await GitUri . fromUri ( uri ) : uri ;
9- if ( gitUri . sha != null ) {
10+ if ( gitUri . sha ) {
1011 // If we have a sha, normalize the history to the working file (so we get a full history all the time)
1112 const workingUri = await container . git . getWorkingUri ( gitUri . repoPath ! , gitUri ) ;
1213 if ( workingUri != null ) {
1314 uri = workingUri ;
1415 }
16+ } else if ( ! ( await container . git . isTracked ( uri ) ) ) {
17+ return undefined ;
1518 }
1619
1720 return uri ;
You can’t perform that action at this time.
0 commit comments