Vscode-gitlens: "Copy Remote File Url" url-encodes the URL

Created on 23 Nov 2020  Â·  9Comments  Â·  Source: eamodio/vscode-gitlens

  • GitLens Version: 11.0.4
  • VS Code version: Code 1.51.1 (e5a624b788d92b8d34d1392e4c4d9789406efe8f, 2020-11-11T01:11:34.018Z)
  • OS version: Darwin x64 20.1.0

Steps to Reproduce:

  1. Invoke the GitLens: Copy Remote File Url command.
  2. Paste to the browser, notice how it url-encoded the slashes (%2F instead of /)

I think this started happening with v11.0.0. The url-encoded version still works but is uglier, for example:

- https://github.com/user/repo/blob/512a30dc.../packages/src/lib/README.md
+ https://github.com/user/repo/blob/512a30dc.../packages%2Fsrc%2Flib%2FREADME.md
pending stable release verified bug

Most helpful comment

This is causing a lot of issue for my firm's hosted bitbucket.

All 9 comments

This is causing a lot of issue for my firm's hosted bitbucket.

Workaround I use for now is to use the Open File on Remote command and copy the URL from the browser. That seems to avoid URL-encoding.

I added the encoding to deal with spaces in the file path (otherwise it would break the url). Maybe I just need to either encode just that, or just decode /.

Can you please verify this fix in the latest insiders version?

You can install the insiders version from here.

Hmm, just installed the insider version. My URLs are still encoded:

https://stash.int.company.net/projects/company/repos/company-app/browse/services%2Fsome-service%2Fsrc%2Fapi%2Fadmin%2Ffoo%2Fget%2Findex.js?at=AM-632-post-internal-endpoint#3

expected:

https://stash.int.company.net/projects/company/repos/company-app/browse/services/some-service/src/api/admin/foo/get/index.js?at=AM-632-post-internal-endpoint#3

Hey @eamodio it seems to be fixed on my end after disabling the GitLens and installing the GitLens Insiders.
@ThibaultJanBeyer probably try disabling the stable release version?

On Mon, 30 Nov 2020 at 18:39, Thibault Jan Beyer notifications@github.com
wrote:

Hmm, just installed the insider version. My URLs are still encoded:

https://stash.int.company.net/projects/company/repos/company-app/browse/services%2Fsome-service%2Fsrc%2Fapi%2Fadmin%2Ffoo%2Fget%2Findex.js?at=AM-632-post-internal-endpoint#3

expected:

https://stash.int.company.net/projects/company/repos/company-app/browse/services/some-service/src/api/admin/foo/get/index.js?at=AM-632-post-internal-endpoint#3

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/eamodio/vscode-gitlens/issues/1202#issuecomment-735704328,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACYRVIVIVQ3Q4Q4WOXLMKF3SSNY55ANCNFSM4T7T3ZNA
.

@ThibaultJanBeyer Are you sure you were testing on the latest insiders? I can't see how you'd get that type of encoding given the changes I've made.

confirm: insiders version fixes the escaping problem.

@eamodio I uninstalled and re-installed the insiders version. Now the encoding seems correct. Thank you!

Was this page helpful?
0 / 5 - 0 ratings