<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ClearChain &#187; rewrite</title>
	<atom:link href="http://www.clearchain.com/blog/tags/rewrite/feed" rel="self" type="application/rss+xml" />
	<link>http://www.clearchain.com/blog</link>
	<description>-= Daily Happenings =-</description>
	<lastBuildDate>Wed, 05 Oct 2011 23:02:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>cgit upgrade &amp; gitweb retired</title>
		<link>http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired</link>
		<comments>http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired#comments</comments>
		<pubDate>Mon, 24 Nov 2008 02:49:05 +0000</pubDate>
		<dc:creator>Benjamin Close</dc:creator>
				<category><![CDATA[FreeDesktop]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cgit]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://www.clearchain.com/blog/?p=142</guid>
		<description><![CDATA[<a href="http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired"><img align="left" hspace="5" width="150" height="150" src="http://www.clearchain.com/blog/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>With CGit v0.8 supporting, atom feeds, patch targets and also the clone-url option, it&#8217;s time to finally rid ourselves of the memory hungry gitweb. Hence cgit.fd.o has been upgraded and gitweb been pointed to cgit.fd.o. There&#8217;s also a bucket load of redirects in place to support this. Hence all the old gitweb url&#8217;s should correctly<a href="http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired"> <font size=-2>[..more..]</font></a>]]></description>
			<content:encoded><![CDATA[<p>With<a href="http://hjemli.net/git/cgit/"> CGit</a> v0.8 supporting, atom feeds, patch targets and also the clone-url option, it&#8217;s time to finally rid ourselves of the memory hungry gitweb. Hence <a href="http://cgit.freedesktop.org/">cgit.fd.o</a> has been upgraded and gitweb been pointed to cgit.fd.o. There&#8217;s also a bucket load of redirects in place to support this. Hence all the old gitweb url&#8217;s should correctly translate into cgit urls.</p>
<p><span id="more-142"></span></p>
<p>Here&#8217;s the url redirect list in case someone else wants to use cgit over gitweb (highly recommended)</p>
<pre>&lt;VirtualHost *:80&gt;
        ServerName gitweb2.freedesktop.org
        ServerAdmin <a class="moz-txt-link-abbreviated" href="mailto:sitewranglers@freedesktop.org">sitewranglers@freedesktop.org</a>

        CustomLog /var/log/apache2/gitweb.freedesktop.org-access.log combined
        ErrorLog /var/log/apache2/gitweb.freedesktop.org-error.log

        #
        # Redirects mapping gitweb -&gt; cgit
        #
        # Gitweb uses get targets seperated by ;
        #
        # /?...;...;...
        #
        # p = Project
        # a = action ( blob, blob_plain, blobdiff, commitdiff, commit, shortlog, summary, tree, log, tag, history, rss)
        # h = SHA Hash
        # o = sort order
        # hb= SHA Hash Tree Base
        # hp= ?
        # pg= page
        # f= file/dir
        #
        # Cgit uses the following:
        #
        # <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>project/action<span class="moz-txt-tag">/</span></em>?...
        #
        # action ( commit, log, diff, tree, tag, patch  )
        #
        # id = SHA Hash
        # id2 = SHA Hash
        # h = head
        #
        # Translation rules
        #
        # Project is a straight redirect
        # ---
        # /?p=([^.]+).git;       <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/$1/">http://cgit.freedesktop.org/$1/</a>
        #
        # Action requires a mapping
        # ---
        # a=(blob|tree) <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>tree<span class="moz-txt-tag">/</span></em>
        # a=(blobdiff|commitdiff)       <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>diff<span class="moz-txt-tag">/</span></em>
        # a=commit      <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>commit<span class="moz-txt-tag">/</span></em>
        # a=(summary)   /
        # a=(shortlog|log|history)      <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>log<span class="moz-txt-tag">/</span></em>
        # a=tag         <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>tag<span class="moz-txt-tag">/</span></em>
        # a=blob_plain  <em class="moz-txt-slash"><span class="moz-txt-tag">/</span>blob<span class="moz-txt-tag">/</span></em>
        # a=rss    ?No CGIT Equivilant?
        #
        # Targets require mapping
        # ---
        # h=([^;]+)     id=$1
        # f=([^;]+)     /$1
        # hb=([^;]+)    id2=$1
        # hp([^;]+      id=$1
        #
        # Now putting it all together
        #
        RewriteEngine On
        #RewriteLog /tmp/rewrite.log
        #RewriteLogLevel 5
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob;h=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/%5?id=%3;id2=%4">http://cgit.freedesktop.org/%1/tree/%5?id=%3;id2=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob;hb=([^;]+);f=([^;]+)
        RewriteRule ^/$  <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/%4?id=%3">http://cgit.freedesktop.org/%1/tree/%4?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree;h=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/%5?id=%4">http://cgit.freedesktop.org/%1/tree/%5?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree;h=([^;]+);hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/?id=%4">http://cgit.freedesktop.org/%1/tree/?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree;hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/?id=%3">http://cgit.freedesktop.org/%1/tree/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tree
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tree/">http://cgit.freedesktop.org/%1/tree/</a>? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blobdiff;h=([^;]+);hp=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/diff/%6?id2=%4;id=%3;id3=%5">http://cgit.freedesktop.org/%1/diff/%6?id2=%4;id=%3;id3=%5</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=commitdiff;h=([^;]+);hp=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/diff/?id=%4;id2=%3">http://cgit.freedesktop.org/%1/diff/?id=%4;id2=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=commitdiff;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/diff/?id=%3">http://cgit.freedesktop.org/%1/diff/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=commit;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/commit/?id=%3">http://cgit.freedesktop.org/%1/commit/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=shortlog;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%3">http://cgit.freedesktop.org/%1/log/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=shortlog
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/">http://cgit.freedesktop.org/%1/log/</a>? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=log;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%3">http://cgit.freedesktop.org/%1/log/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=log
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log">http://cgit.freedesktop.org/%1/log</a>? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;h=([^;]+);hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/%5?id=%4">http://cgit.freedesktop.org/%1/log/%5?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;h=([^;]+);hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%4">http://cgit.freedesktop.org/%1/log/?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;hb=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/%4?id=%3">http://cgit.freedesktop.org/%1/log/%4?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=history;hb=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/log/?id=%3">http://cgit.freedesktop.org/%1/log/?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=tag;h=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/tag/?id=%4">http://cgit.freedesktop.org/%1/tag/?id=%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob_plain;h=([^;]+);f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/blob/%4?id=%3">http://cgit.freedesktop.org/%1/blob/%4?id=%3</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=blob_plain;f=([^;]+)
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/blob/%4">http://cgit.freedesktop.org/%1/blob/%4</a> [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=rss
        RewriteRule ^/$ http://cgit.freedesktop.org/%1/atom? [R,L,NE]
        RewriteCond %{query_string} p=([^.]+)(\.git)*;a=summary
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/">http://cgit.freedesktop.org/%1/</a>? [R,L,NE]
        #
        # Fail safes incase nothing above matches, try at least to put the person in the project, els root of cgit
        RewriteCond %{query_string} p=([^.]+)(\.git)*.*
        RewriteRule ^/$ <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/%1/">http://cgit.freedesktop.org/%1/</a>? [R,L,NE]
        RewriteRule ^.* <a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/">http://cgit.freedesktop.org/</a> [R,L,NE]
&lt;/VirtualHost&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

