rscherf / GitLink

Open your Sublime Text files on GitHub, Bitbucket, Gitlab or Codebase
http://ryan.sc
35 stars 25 forks source link

Re-add default origin? #32

Closed shanet closed 1 year ago

shanet commented 1 year ago

Prior to 96d208c29e56a14c83b6bbef620ff3c4fba35852 if there was no remote found it would default to origin with git remote show | grep upstream || echo origin. The behavior now is that if git config --get branch.{}.remote returns no origin the plugin will throw an error and appear to do nothing.

In my case this is happening with branches I create locally and haven't set an upstream on yet leading to confusing behavior. Having that default value there would allow the links to open even if no remote is set for a branch yet.

Let me know if this would be desired behavior and I can cut a PR for it.

rscherf commented 1 year ago

I think that is a great idea, and would be happy to accept a PR.