veler / CopyGitLink

Copy links to files or selections to GitHub and Azure DevOps directly from Visual Studio's text editor, Solution Explorer and document tab.
https://marketplace.visualstudio.com/items?itemName=EtienneBAUDOUX.CopyGitLink
MIT License
42 stars 9 forks source link

Incorrect link generated, possibly tied to memory constrained system. #13

Open Alexandre-Nourissier opened 2 years ago

Alexandre-Nourissier commented 2 years ago

While it usually performs admirably, I encountered a surprising bug today :

Environment

CopyGitLink Version 1.4.1 Microsoft Visual Studio Enterprise 2019 Version 16.11.1

What happened?

Generated a link without the first character of the file path : https://github.com/Hectre/WebApp/blob/36fcd13a995694de4ffa440ba270d6d75711afd8/ectre.AspNetCore.Utilities.Tests/ApplicationFactory/CustomWebApplicationFactory.cs#L91-L91

Notice ectre.AspNetCore

What did you expect?

Generate a link with the complete file path : https://github.com/Hectre/WebApp/blob/36fcd13a995694de4ffa440ba270d6d75711afd8/Hectre.AspNetCore.Utilities.Tests/ApplicationFactory/CustomWebApplicationFactory.cs#L91-L91

Notice Hectre.AspNetCore

Additional information

I was able to reproduce it with every type of link generation, on multiple files of various depths in this repository.

I was running short on memory due to a RoslynAnalyzer memory leak. After restarting Visual Studio, the link generation generated the files properly again.

veler commented 2 years ago

It is indeed very surprising! Thanks for reporting it. I will look at how the URL is generated to see if there's an obvious mistake that could cause this.

hammond13 commented 2 years ago

I ran into this issue as well. The first letter of the file path in the link was missing. It didn't seem to be related to a memory issue, but restarting Visual Studio did fix it.

AaronSchares commented 2 years ago

I'm seeing the same issue. The first letter after the blob ID is missing. Restarting fixed it for a while, but it came back after an hour or so.

Alexandre-Nourissier commented 5 months ago

It happened again, on a totally different device, on Visual Studio 2022 and in another private org/repo.