From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Dunsmore Subject: Gitweb short URLs Date: Sun, 09 Jan 2011 13:37:14 -0600 Message-ID: <878vytkgwl.fsf@riotblast.dunsmor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=43806 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pc14o-0005YL-QB for emacs-orgmode@gnu.org; Sun, 09 Jan 2011 14:37:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pc14m-0005cO-Qw for emacs-orgmode@gnu.org; Sun, 09 Jan 2011 14:37:18 -0500 Received: from deathroller.dunsmor.com ([98.129.169.48]:54107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pc14m-0005bn-Na for emacs-orgmode@gnu.org; Sun, 09 Jan 2011 14:37:16 -0500 Received: from riotblast.dunsmor.com (65-36-72-143.dyn.grandenetworks.net [65.36.72.143]) by deathroller.dunsmor.com (Postfix) with ESMTP id 5FCBD8C043 for ; Sun, 9 Jan 2011 13:36:57 -0600 (CST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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