소스 검색

Fixes the path of git: uris -- won't load content otherwise

main
Eric Amodio 6 년 전
부모
커밋
c2483200c9
3개의 변경된 파일13개의 추가작업 그리고 7개의 파일을 삭제
  1. +1
    -0
      CHANGELOG.md
  2. +1
    -7
      src/git/gitService.ts
  3. +11
    -0
      src/git/gitUri.ts

+ 1
- 0
CHANGELOG.md 파일 보기

@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Fixes an issue where gravatar icons would sometimes not show up — thanks to [PR #579](https://github.com/eamodio/vscode-gitlens/pull/579) by sgtwilko ([@sgtwilko](https://github.com/sgtwilko))
- Fixes [#501](https://github.com/eamodio/vscode-gitlens/issues/501) — Azure DevOps ssh remotes aren't handled properly
- Fixes [#572](https://github.com/eamodio/vscode-gitlens/issues/572) — Explorer cant expand some branch folders
- Fixes an issue where comparing a file with its staged revision doesn't show any content
## [9.0.3] - 2018-12-06

+ 1
- 7
src/git/gitService.ts 파일 보기

@ -1906,13 +1906,7 @@ export class GitService implements Disposable {
}
if (Git.isStagedUncommitted(ref)) {
const path = GitUri.resolve(fileName, repoPath);
return Uri.parse(
`git:${path}?${JSON.stringify({
path: path,
ref: '~'
})}`
);
return GitUri.git(fileName, repoPath);
}
return GitUri.toRevisionUri(ref, fileName, repoPath!);

+ 11
- 0
src/git/gitUri.ts 파일 보기

@ -323,6 +323,17 @@ export class GitUri extends ((Uri as any) as UriEx) {
return Strings.normalizePath(relativePath);
}
static git(fileName: string, repoPath?: string) {
const path = GitUri.resolve(fileName, repoPath);
return Uri.parse(
`git:${path}?${JSON.stringify({
// Ensure we use the fsPath here, otherwise the url won't open properly
path: Uri.file(path).fsPath,
ref: '~'
})}`
);
}
static resolve(fileName: string, repoPath?: string) {
const normalizedFileName = Strings.normalizePath(fileName);
if (repoPath === undefined) return normalizedFileName;

불러오는 중...
취소
저장