emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Gitweb short URLs
@ 2011-01-09 19:37 Jason Dunsmore
  0 siblings, 0 replies; only message in thread
From: Jason Dunsmore @ 2011-01-09 19:37 UTC (permalink / raw)
  To: emacs-orgmode

I implemented some rewrite rules to make our Gitweb have
repo.or.cz-style short URLs.

Here are examples of the short URLs:

http://orgmode.org/w/org-mode.git/blob/22eae22:/.gitmodules
http://orgmode.org/w/org-mode.git/blob/lisp/org.el
http://orgmode.org/w/org-mode.git/commit/22eae22
http://orgmode.org/w/org-mode.git/commitdiff/22eae22
http://orgmode.org/w/org-mode.git/log/22eae22
http://orgmode.org/w/org-mode.git/shortlog/22eae22
http://orgmode.org/w/org-mode.git/tree/22eae22
http://orgmode.org/w/org-mode.git/tree/22eae22:/EXPERIMENTAL
http://orgmode.org/w/org-mode.git/summary

And here are the rewrite rules:

rewrite /w/$ /w/gitweb.cgi break;
rewrite /w/(.*)\.git$ /w/gitweb.cgi?p=$1.git break;
rewrite /w/(.*)\.git/summary$ /w/gitweb.cgi?p=$1.git&a=summary break;
rewrite /w/(.*)\.git/(tree)/(.*)$ /w/gitweb.cgi?p=$1.git&a=$2 break;
rewrite /w/(.*)\.git/(blob|tree)/(.*):/(.*)$ /w/gitweb.cgi?p=$1.git&a=$2&hb=$3&f=$4 break;
rewrite /w/(.*)\.git/(blob)/(.*)$ /w/gitweb.cgi?p=$1.git&a=$2&f=$3 break;
rewrite /w/(.*)\.git/(commit|commitdiff|log|shortlog)/(.*)$ /w/gitweb.cgi?p=$1.git&a=$2&h=$3 break;

Regards,
Jason

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-09 19:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-09 19:37 Gitweb short URLs Jason Dunsmore

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).