Closed ryanhinton closed 4 years ago
Hmmm.... I'm now thinking this issue has nothing to do with SCM Breeze since even git branch
produces the same error.
Scm breeze sets a shell function for the value of git
.
$ type git
git is a function
git ()
{
case $1 in
commit | blame | add | log | rebase | merge | difftool)
exec_scmb_expand_args "$_git_cmd" "$@"
;;
checkout | diff | rm | reset)
exec_scmb_expand_args --relative "$_git_cmd" "$@"
;;
branch)
_scmb_git_branch_shortcuts "${@:2}"
;;
*)
"$_git_cmd" "$@"
;;
esac
}
$ which git
/usr/bin/git
Try$(which git) branch
and see if the error goes away.
This looks like the git branch
support is messing up on windows.
Thank you for your reply :-) I tried your recommendation, but receive the same error.
λ $(which git) branch
bash: /c/Program: No such file or directory
Ok, so what type of bash environment are you using on windows? Looks like
there is a path with a space /c/Program Files/..
that isn't being handled
correctly.
On Fri, Aug 30, 2019 at 5:21 PM Ryan Hinton notifications@github.com wrote:
Thank you for your reply :-) I tried your recommendation, but receive the same error.
λ $(which git) branch
bash: /c/Program: No such file or directory
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/scmbreeze/scm_breeze/issues/293?email_source=notifications&email_token=AABHEKV6KLWUC3DHE6SK2O3QHGFNBA5CNFSM4ISPF6SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5S2CGY#issuecomment-526754075, or mute the thread https://github.com/notifications/unsubscribe-auth/AABHEKRPKLXUKXFXPKLCNZ3QHGFNBANCNFSM4ISPF6SA .
What is the output of which git
λ which git
/c/Program Files/Git/bin/git
The quick fix would be to reinstall your git to a filepath without a space.
is that a part of SCM Breeze or Git itself?
I think I'm able to trail through this. Let me see if I can fix it and possibly be able to make a PR, if that is possible?
The function bin_path is what is returning the path with a space in it. We'd need to do some type of additional processing on the path there to make it support paths with spaces. =/
I did try to make this work, but kept receiving various errors. I'm rather new to shell scripting. I thought it would be simply a search and replace to escape spaces with a backslash and space, but with limited time and knowledge, I could not make it work. Instead, I uninstalled Git and installed it to the C:\ root path rather than C:\Program Files. This allowed gb
to work.
Hello, this is probably another bug for Windows users. Whenever I attempt to execute
gb
shortcut forgit branch
, I get the following error.Is there something I need to do with configuration files or is this a problem somewhere in the code by chance? I'm not sure why some shortcuts work and some do not.
Thank you for any feedback.