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

When using `gs` shortcut, the fallback standard `git status` is always used #290

Open ryanhinton opened 5 years ago

ryanhinton commented 5 years ago

Hello, I'm now having to use Ruby and I noticed my previous ticket #242 solution was to uninstall Ruby. I am re-opening this issue for the ruby 2.6.3p62 version compatibility.

I also read the comment in #242 at the end, so I will try it now as well in hopes that it might be as simple as it looks.

The following is the current issue:

Whenever I attempt to run gs in bash, I always receive the following message, even though the amount of files changed is far less than 150 changed files. I have tested this on multiple repos. The first repo has 17 file changes. The second repo has 10 file changes.

"There were more than 150 changed files. SCM Breeze has fallen back to standard git status for performance reasons."

ghthor commented 4 years ago

Maybe this is because of RVM? I'm running

$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

And I cannot reproduce this issue.

goostleek commented 4 years ago

I got the same after installing ruby.

$ gs
The system cannot find the path specified.
Traceback (most recent call last):
C:/Users/marcin.klopotek/.scm_breeze/lib/git/status_shortcuts.rb:29:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
On branch master
Your branch is behind 'origin/master' by 6 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   README.md
        modified:   lib/git/fallback/status_shortcuts_shell.sh
        modified:   lib/git/shell_shortcuts.sh

no changes added to commit (use "git add" and/or "git commit -a")

There were more than 150 changed files. SCM Breeze has fallen back to standard `git status` for performance reasons.
$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]

UPDATE: I used the suggested fix and it seems to be working fine now

$ gs
# On branch: master  |  -6  |  [*] => $e*
#
➤ Changes not staged for commit
#
#       modified: [1] README.md
#       modified: [2] lib/git/fallback/status_shortcuts_shell.sh
#       modified: [3] lib/git/shell_shortcuts.sh
#       modified: [4] lib/git/status_shortcuts.rb
#
ghthor commented 4 years ago

Ok, so this is clearly a Windows only issue which is why I wasn't able to reproduce. Something to do with removing the pipe redirection in that raw commandline string gauging from the suggested fix.

ryanhinton commented 4 years ago

Yes, the fix worked for me as well. Is there a way for some implementation of the fix to be included in the code for Windows users?

ksamuel commented 3 years ago

I have the same issue, but using Ubuntu. The windows fix doesn't do anything.

ghthor commented 3 years ago

@ksamuel can you copy the output of you ubuntu systems ruby version? Something like

$ which ruby && ruby --version

On Tue, May 4, 2021, 8:51 AM ksamuel @.***> wrote:

I have the same issue, but using Ubuntu. The windows fix doesn't do anything.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/scmbreeze/scm_breeze/issues/290#issuecomment-831957906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABHEKXF33MXBMBTHWRG2ZTTL73UZANCNFSM4HN6NXEA .

ksamuel commented 3 years ago

/usr/bin/ruby
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]```