From: Jason Dunsmore <emacs-orgmode@dunsmor.com>
To: emacs-orgmode@gnu.org
Subject: Gitweb short URLs
Date: Sun, 09 Jan 2011 13:37:14 -0600 [thread overview]
Message-ID: <878vytkgwl.fsf@riotblast.dunsmor.com> (raw)
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
reply other threads:[~2011-01-09 19:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878vytkgwl.fsf@riotblast.dunsmor.com \
--to=emacs-orgmode@dunsmor.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).