DonJayamanne / gitHistoryVSCode

Git History for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory
MIT License
947 stars 153 forks source link

Error when 'View file contents' #283

Closed Mrneet closed 5 years ago

Mrneet commented 6 years ago

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)

image

Sevyls commented 6 years ago

Having the same issue, "View file contents" does nothing

freddyouellette commented 6 years ago

Same with me. Actually, when I select any option from the menu - "View File Contents", "Compare against workspace file", "Compare against previous version", "View file history," nothing happens. The output from "Git History" shows no signs of anything happening. It worked earlier this morning, I'm almost sure of it.

tasoskakour commented 6 years ago

Same for me. The "View file contents" does nothing. The other 3 work though ("Compare against workspace", "Compare against previous version", "View file history")

ghost commented 6 years ago

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 being C:/d:/path/to/file.ext

tomercagan commented 6 years ago

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:

git log --pretty=oneline b0859fbc3bedf5b68bf21af1f071ac614b053206^1 -n 1 -- ......\c:\tomer\projects\CellXM\server\controllers\cm\auditController.js (completed in 0.096s) fatal: ......\c:\tomer\projects\CellXM\server\controllers\cm\auditController.js: '......\c:\tomer\projects\CellXM\server\controllers\cm\auditController.js' is outside repository

git show b0859fbc3bedf5b68bf21af1f071ac614b053206:../../../c:/tomer/projects/CellXM/server/controllers/cm/auditController.js (completed in 0.099s) fatal: '../../../c:/tomer/projects/CellXM/server/controllers/cm/auditController.js' is outside repository

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...

Audomaro commented 6 years ago

I have the same problem for some months ... someone has found or has a solution 🤔?

sonnyandersson commented 6 years ago

Same issue here...

liximomo commented 6 years ago

Same issue here... MacOS 10.13.5

liximomo commented 6 years ago

I've made a pr for this. Hope @DonJayamanne can merge it soon.

QuadmanSWE commented 6 years ago

I have the same problem. This feature is really important in order to follow code evolution and find errors.

tomercagan commented 6 years ago

Hi,

I also tried to fix this issue but wasn’t even able to debug the extension. Do you have any “guideline” how to get up and running?

Once you do, I’d be happy to try your PR (also, it seems you are using Mac, I’d be happy to get it to work on Windows)

From: X.L notifications@github.com Sent: Friday, August 17, 2018 11:48 To: DonJayamanne/gitHistoryVSCode gitHistoryVSCode@noreply.github.com Cc: tomercagan tomer@tomercagan.com; Comment comment@noreply.github.com Subject: Re: [DonJayamanne/gitHistoryVSCode] Error when 'View file contents' (#283)

I've made a pr for this. Hope @DonJayamanne https://github.com/DonJayamanne can merge it soon.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DonJayamanne/gitHistoryVSCode/issues/283#issuecomment-413800475 , or mute the thread https://github.com/notifications/unsubscribe-auth/AD5axYKrwoxOEf76t4xIgEeYWLkjCS4Rks5uRoNdgaJpZM4Ui-j6 . https://github.com/notifications/beacon/AD5axRBGTdLUjKOBovxfBxCiauMMZThcks5uRoNdgaJpZM4Ui-j6.gif

Mrneet commented 6 years ago

There are other issues.

Clicking "Compare against workspace file" get error image

Clicking "Compare against previous version" and nothing happens.

ver. 5.8.2, Windows 10

tomercagan commented 6 years ago

Windows seems to generally have an issue with the path it's trying to open/compare. Can you check/ensure your getting an error?

Get Outlook for Android

On Fri, Aug 17, 2018 at 8:08 PM +0300, "Mrneet" notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Mrneet commented 6 years ago

Thanks for your reply.

This the Git History output when I clicking "Compare against previous version"

git log --pretty=oneline 748083f3d3130afc80255eb420643668d8533f8c^1 -n 1 -- ................\c:\Users\skywm\Documents\Ph.D\In Mizzou\Papers\Position and DOA Estimation Using TDOA\ClosedForm_TDOA_MPR_IEEEtran\Position_DOA_Estmate_jrnl.tex (completed in 0.073s) fatal: ................\c:\Users\skywm\Documents\Ph.D\In Mizzou\Papers\Position and DOA Estimation Using TDOA\ClosedForm_TDOA_MPR_IEEEtran\Position_DOA_Estmate_jrnl.tex: '................\c:\Users\skywm\Documents\Ph.D\In Mizzou\Papers\Position and DOA Estimation Using TDOA\ClosedForm_TDOA_MPR_IEEEtran\Position_DOA_Estmate_jrnl.tex' is outside repository

git show 748083f3d3130afc80255eb420643668d8533f8c:../../../../../../../../c:/Users/skywm/Documents/Ph.D/In Mizzou/Papers/Position and DOA Estimation Using TDOA/ClosedForm_TDOA_MPR_IEEEtran/Position_DOA_Estmate_jrnl.tex (completed in 0.075s) fatal: '../../../../../../../../c:/Users/skywm/Documents/Ph.D/In Mizzou/Papers/Position and DOA Estimation Using TDOA/ClosedForm_TDOA_MPR_IEEEtran/Position_DOA_Estmate_jrnl.tex' is outside repository

Actually, the error does not happen every time. As I know, if I reopen the VS Code, open Git History and chose a record, both the comparing with workspace and previous version work well. But if I switch to another record, the errors happen as I descripted in the recent comment.

I am sorry for my unclear description. I am not familiar with Git.

strongui commented 6 years ago

Same issue here as described above.

liximomo commented 6 years ago

@Mrneet I've made a fix package. You can use it until @DonJayamanne merge my pr.

Mrneet commented 6 years ago

@liximomo Thank you! I have moved to GitLens. I'll back after this problem has been fixed.

dontry commented 6 years ago

Same issue here as described above.

QuadmanSWE commented 6 years ago

@liximomo Thanks a million.

blachawk commented 6 years ago

My setup:

Version: 1.26.1 Commit: 493869ee8e8a846b0855873886fc79d480d342de Date: 2018-08-16T18:37:28.532Z Electron: 2.0.5 Chrome: 61.0.3163.100 Node.js: 8.9.3 V8: 6.1.534.41 Architecture: ia32

I'm on Windows 10 and I am experiencing all these issues mentioned above.

In addition, when I click on a specific commit within my File History I get the following message:

git remote get-url origin (completed in 0.262s) fatal: No such remote 'origin'

ole1986 commented 6 years ago

May also be fixed with PR #316

ole1986 commented 6 years ago

is this still an issue in version 0.4.3?

QuadmanSWE commented 5 years ago

Finally, looks like all the features work when looking at/comparing to old versions of a file.

edit: Just wanted to add a big thank you to whoever fixed this issue and for those that brought it up. This made me in a good mood. =)