gitHistoryVSCode: Error when 'View file contents'
Thanks for your excellent work.
There is a problem when I try to view one of the history file contents. It worked before. I am not sure when this problem started because I don’t use this command for a long time. My laptop and desktop have the same problem. The output is
git rev-parse --show-toplevel (completed in 0.001s) {"stack":"Error: spawn C:/Program Files/Git/bin/git ENOENT\n\tat exports._errnoException (util.js:1050:11)\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)\n\tat onErrorNT (internal/child_process.js:367:16)\n\tat _combinedTickCallback (internal/process/next_tick.js:80:11)\n\tat process._tickCallback (internal/process/next_tick.js:104:9)","message":"spawn C:/Program Files/Git/bin/git ENOENT","code":"ENOENT","errno":"ENOENT","syscall":"spawn C:/Program Files/Git/bin/git","path":"C:/Program Files/Git/bin/git","spawnargs":["rev-parse","--show-toplevel"]} git rev-parse --show-toplevel (completed in 0.002s)

About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 17
- Comments: 23 (2 by maintainers)
Having the same issue, “View file contents” does nothing
Me too:
For some reason, when trying to open history of any file, it appends the drive letter
C:/to the correct path (I have my project on drive D:) so it ends beingC:/d:/path/to/file.ext@Mrneet I’ve made a fix package. You can use it until @DonJayamanne merge my pr.
There are other issues.
Clicking “Compare against workspace file” get error
Clicking “Compare against previous version” and nothing happens.
ver. 5.8.2, Windows 10
I am getting the same error. It seems that when the extension submit the command, it builds wrong the path to the file . In the git log I see the following:
When I am using this plugin in VS Code on a mac it works fine - so I believe it’s something to do with how Windows files are addressed…