motemen/ghq — pull request #25 by yuya-takeyama (2014-07-12 06:22:59+00:00)
Title: [WIP] Read ghq.protocol to determine protocol (using git config --get-urlmatch)

Reflect feedback on motemen/ghq#24

Difference is

* Use `git config --get-urlmatch` insted of `git config --get`
* Default value of the variable `protocolConfig` takes `"https"` instead of `"http"` (it's not used currently)

I tested this manually and looks work fine.

But following problem is found.

* `go test` fails when local `ghq.protocol` is `ssh`

Testing depends on `.gitconfig` is too hard.
IMHO, it requires some abstraction of configuration and command-line options.

Any ideas?