rscherf / GitLink

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

Broken for git:// repositories since 602785e #6

Closed akrabat closed 8 years ago

akrabat commented 8 years ago

(updated for correct commit that broke it for me)

Commit https://github.com/rscherf/GitLink/commit/602785e133100f87ceecb6670d11f1d326d8d38e has broken GitLink for me on OS X. if I go back to commit https://github.com/rscherf/GitLink/commit/7750f5b057052f17254cb6d3284b0e37205c140f then it works again.

I'm using git version 2.6.4 and the error I see in ST's console is:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 550, in run_
    return self.run(edit, **args)
  File "/Users/rob/Library/Application Support/Sublime Text 3/Packages/GitLink/GitLink.py", line 59, in run
    source, user, repo = git_config.replace(".git", "").replace("https://", "").split("/")
ValueError: need more than 2 values to unpack

Line 59 is:

source, user, repo = git_config.replace(".git", "").replace("https://", "").split("/")

if I print(git_config), I see:

akrabat/slim3-skeleton.git

The output of git remote show origin -n is:

* remote origin
  Fetch URL: git@github.com:akrabat/slim3-skeleton.git
  Push  URL: git@github.com:akrabat/slim3-skeleton.git
  HEAD branch: (not queried)
  Remote branches: (status not queried)
    master
    remove-index-php
  Local branches configured for 'git pull':
    master           merges with remote master
    remove-index-php merges with remote remove-index-php
  Local ref configured for 'git push' (status not queried):
    (matching) pushes to (matching)