Ver a proveniência

Fixes #591 & #633 - encodes uris properly now

main
Eric Amodio há 5 anos
ascendente
cometimento
b08e46fd6f
2 ficheiros alterados com 12 adições e 8 eliminações
  1. +2
    -0
      CHANGELOG.md
  2. +10
    -8
      src/git/gitUri.ts

+ 2
- 0
CHANGELOG.md Ver ficheiro

@ -8,9 +8,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#591](https://github.com/eamodio/vscode-gitlens/issues/591) - GitLens Error: Unable to open
- Fixes [#620](https://github.com/eamodio/vscode-gitlens/issues/620) - Branch names with only digits always appear first — thanks to [PR #621](https://github.com/eamodio/vscode-gitlens/pull/621) by Yan Zhang ([@Eskibear](https://github.com/Eskibear))
- Fixes [#626](https://github.com/eamodio/vscode-gitlens/issues/626) - Branch names with only digits always appear first — thanks to [PR #627](https://github.com/eamodio/vscode-gitlens/pull/627) by Marc Lasson ([@mlasson](https://github.com/mlasson))
- Fixes [#631](https://github.com/eamodio/vscode-gitlens/issues/631) - Remotes fail to show in gui
- Fixes [#633](https://github.com/eamodio/vscode-gitlens/issues/633) - Compare File with Previous Revision doesn't work if path contains '#'
## [9.4.1] - 2019-01-08

+ 10
- 8
src/git/gitUri.ts Ver ficheiro

@ -326,11 +326,13 @@ export class GitUri extends ((Uri as any) as UriEx) {
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: '~'
})}`
`git:${encodeURIComponent(path)}?${encodeURIComponent(
JSON.stringify({
// Ensure we use the fsPath here, otherwise the url won't open properly
path: Uri.file(path).fsPath,
ref: '~'
})
)}`
);
}
@ -398,9 +400,9 @@ export class GitUri extends ((Uri as any) as UriEx) {
};
const uri = Uri.parse(
`${DocumentSchemes.GitLens}:///${repoName}@${shortSha}${
filePath === slash ? empty : filePath
}?${JSON.stringify(data)}`
`${DocumentSchemes.GitLens}:///${encodeURIComponent(repoName)}@${shortSha}${
filePath === slash ? empty : encodeURIComponent(filePath)
}?${encodeURIComponent(JSON.stringify(data))}`
);
return uri;
}

Carregando…
Cancelar
Guardar