Explicitly setting `hub.protocol` to `git` or using `HUB_PROTOCOL=git`
still uses the `git` protocol.
Co-authored-by: Mislav Marohnić <mislav@github.com>
This is to avoid having a writeable fork added with `git://` protocol
(the default when `hub.protocol` is not configured).
This matches the behavior of `hub clone`.
I tried to hack Sinatra to automatically serialize non-string response
bodies as JSON, but this is not straightforward due to sinatra/sinatra#512
and doesn't really work in a whole lot of edge-cases.
Introduced a simple `json` helper and now using that instead of `body`.