GitTools / GitLink

Making .NET open source accessible!
MIT License
555 stars 86 forks source link

Instrument PDB with Git Object Hash with File Name? #206

Closed davideason closed 6 years ago

davideason commented 6 years ago

Hello all! I've been fiddling some time now with GitLink. It's an awesome tool, many thanks to the contributors.

I'm attempting to implement something similar to @shonnly, but seem to have an issue with uniquely identifying the correct file via my custom proxy. Given a Revision Sha and FileName, there are situations where more than 1 file in a repo shares the same name. If GitLink instruments my PDB with a Custom URI including Revision and FileName (var2), I still cannot determine the exact file for the particular PDB block. If we could lookup file contents by Revision Sha and File/Object Sha, it would be 100% unique per file at a particular commit.

There may be something I have missed to achieve this functionality, if it's obvious (or not) please share!

Thanks, -David

GeertvanHorrik commented 6 years ago

Can you give an example where local path + commit sha would result in clashes? I can't think of any.

davideason commented 6 years ago

@GeertvanHorrik, thanks for your quick reply. As it turns out, my understanding and usage of the Local Path/Var2 was incorrect. What I was seeing instrumented in the PDB was not immediately visible that the local path is in fact the relative path in the repo. When testing the functionality, I was seeing something I thought was the final URI (Private BB server) in my VS output was something else due to other plugin output I had forgotten I was using.

For anyone coming after me (or when I forget this)- the %var2% in the PDB is not just the filename of the target source file, but the full relative path in the repo to the source file.

You may close this issue. Thanks for the support!