sshaw / git-link

Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location
394 stars 73 forks source link

Add savannah.gnu.org (cgit) support #34

Closed itorres closed 5 years ago

itorres commented 8 years ago

The main difference is the modification in git-link-remote-regex since cgit instances don't necessarily have an username part and even in savannah.gnu.org some projects live in the git root (for example: http://git.savannah.gnu.org/cgit/guix.git/)

sshaw commented 8 years ago

Hi @itorres, thanks for this commit.

Support for Savanah has been discussed before and my feelings can be found here.

Support for cgit would be great (🎆 🎉 ❗) but there's a small quirk. How do you propose dealing with this?

I think I created a branch locally to simply service creation and better deal with different url formats by allowing one to do things like this:

(add-to-list 'git-link-remote-alist 
  '("foo.com" "http://{hostname}/cgit.cgi/{dirname}}/commit?id={{commit}}"))
(add-to-list 'git-link-remote-alist 
  '("example.com" old-style-funtion))

But it's not done.

Also can you rebase against the url-with-port branch master and fix your regex additions to match it. That branch resolves #32.

Thanks!

sshaw commented 5 years ago

Would be great to have cgit support. Please feel free to reopen if the outstanding issues/questions can be resolved.