Browse Source

Fixes issue with staged/working git documents

main
Eric Amodio 6 years ago
parent
commit
d85965f7cc
1 changed files with 17 additions and 3 deletions
  1. +17
    -3
      src/git/gitUri.ts

+ 17
- 3
src/git/gitUri.ts View File

@ -166,12 +166,26 @@ export class GitUri extends ((Uri as any) as UriEx) {
const repoPath = await git.getRepoPath(data.path);
let ref;
switch (data.ref) {
case '':
case '~':
ref = GitService.stagedUncommittedSha;
break;
case null:
ref = undefined;
break;
default:
ref = data.ref;
break;
}
return new GitUri(uri, {
fileName: data.path,
repoPath: repoPath,
sha: data.ref === '' || data.ref == null
? undefined
: data.ref
sha: ref
} as IGitCommitInfo);
}

Loading…
Cancel
Save