git-up
git-up copied to clipboard
git-up fails when origin url is using https instead of ssh
If git repository was cloned via https://url/repo instead of SSH (git@url:repo), executing git up in the directory always throws an error:
/usr/lib/ruby/gems/2.2.0/gems/grit-2.5.0/lib/grit/git-ruby.rb:116:in `chdir': Not a directory @ dir_chdir - /home/edv/projects/kapma/code/ops/salt-master/formula-source/gitlab-ci-runner-formula/.git (Errno::ENOTDIR)
from /usr/lib/ruby/gems/2.2.0/gems/grit-2.5.0/lib/grit/git-ruby.rb:116:in `refs'
from /usr/lib/ruby/gems/2.2.0/gems/grit-2.5.0/lib/grit/ref.rb:13:in `find_all'
from /usr/lib/ruby/gems/2.2.0/gems/grit-2.5.0/lib/grit/repo.rb:213:in `heads'
from /home/edv/.gem/ruby/2.2.0/gems/git-up-0.5.12/lib/git-up.rb:158:in `remote_map'
from /home/edv/.gem/ruby/2.2.0/gems/git-up-0.5.12/lib/git-up.rb:154:in `remotes'
from /home/edv/.gem/ruby/2.2.0/gems/git-up-0.5.12/lib/git-up.rb:12:in `run'
from /home/edv/.gem/ruby/2.2.0/gems/git-up-0.5.12/bin/git-up:5:in `<top (required)>'
from /home/edv/.gem/ruby/2.2.0/bin/git-up:23:in `load'
from /home/edv/.gem/ruby/2.2.0/bin/git-up:23:in `<main>'
I am pretty sure the functionality of git up should work with either protocol (https on ssh). If not, then you could at least give a nicer warning message informing user on what is wrong.