scmbreeze / scm_breeze

Adds numbered shortcuts to the output git status, and much more
https://madebynathan.com/2011/10/19/git-shortcuts-like-youve-never-seen-before/
MIT License
2.82k stars 192 forks source link

Issue after installing scm_breeze #242

Closed ryanhinton closed 6 years ago

ryanhinton commented 6 years ago

Hello,

I have been using scm_breeze for a few months now without issues until I installed it on a new machine today. After installation, I keep getting the following notification when using shortcut gs: "There were more than 150 changed files. SCM Breeze has fallen back to standard git status for performance reasons." I looked up any issues related to this and found a way to increase the number of of changed files. I incrementally tried all of the way up to 10000, but it always continues with this notification and I know that I certainly do not have 10000 or more changes files.
I continued to move on and committed all of my changes in hopes that maybe after I have nothing to commit with a clean working directory that this notification would go away, but it still remains.

Also, now that I do have a clean working directory, a new error happens when using shortcut gs: "The system cannot find the path specified. U:/.scm_breeze/lib/git/status_shortcuts.rb:29:in <main>': undefined method[]' for nil:NilClass (NoMethodError)"

Is scm_breeze somehow looking in the wrong places?

image

Thank you for any assistance.

Regards, Ryan Hinton

ryanhinton commented 6 years ago

i uninstalled Ruby, then restarted the MINGW64 and all of the errors went away. I would love to be able to have Ruby installed so that scm_breeze runs faster, so I am still in need of figuring out the problem. For the time being, I will leave it this way until I hear from anyone on this matter.

Thank you! Ryan

ghthor commented 6 years ago

Would you mind trying this again and letting me know which versions of ruby are being used? If you find this same bug, open a new issue for ruby X.X.X version compatibility. Thanks!

sarbull commented 6 years ago

This will work on Windows 7 if you change in file .scm_breeze/lib/git/status_shortcuts.rb#24 from:

@git_status = `\git status --porcelain -b 2> /dev/null`

to

@git_status = `\git status --porcelain -b`

Works flawlessly on Windows 7.

image

ryanhinton commented 5 years ago

@sarbull Your solution to this problem worked perfectly! I needed to install Ruby and ran into this issue again, but this time I cannot uninstall Ruby. Thank you so much for sharing your solution! :-) BTW, this worked on Windows 10.

ghthor commented 4 years ago

Ok, this must be some type of OS cross-compatibility issue. At first glance the following line looks distinctly UNIX and removing the use of the stderr redirection fixes the execution within a Windows environment. I don't know how I'll fix this, maybe just make this command conditional based on the OS value, I'll have to figure out how to detect this from within this ruby environment... hmmm

@git_status = `\git status --porcelain -b 2> /dev/null`