shithub: shithub

Download patch

ref: 26fca7ea9668ad3f4c94efe74893f28baa1370a7
parent: 28fb8ec96341a7523c9c2e3b51c80ebe1a56cb0d
author: phil9 <[email protected]>
date: Fri Oct 29 02:12:42 EDT 2021

rename patch rule to prevent name clashing

	one shortcoming of execfs is that it is not possible to get to a file
	if a rule matches said file name.
	The patch rule now has a name that will hopefully not be used in any repo.

--- a/gitrules
+++ b/gitrules
@@ -7,5 +7,5 @@
 ([^'/]+)/([^'/]+)/([^'/]+)/(([^']+)/)?raw	/bin/shithub/viewraw	/usr/git '\1' '\2' '\3' '\5'
 ([^'/]+)/([^'/]+)/([^'/]+)/log.html		/bin/shithub/log	/usr/git '\1' '\2' '\3'
 ([^'/]+)/([^'/]+)/([^'/]+)/commit.html		/bin/shithub/show	/usr/git '\1' '\2' '\3'
-([^'/]+)/([^'/]+)/([^'/]+)/patch		/bin/shithub/patch	/usr/git '\1' '\2' '\3'
+([^'/]+)/([^'/]+)/([^'/]+)/_patch		/bin/shithub/patch	/usr/git '\1' '\2' '\3'
 ([^'/]+)/([^'/]+)/([^'/]+)/feed.rss		/bin/shithub/feed	/usr/git '\1' '\2' '\3'
--- a/show
+++ b/show
@@ -27,7 +27,7 @@
 date=`''{date `{mtime $gitfs/$ref/msg | awk '{print $1}'}}
 msg=`''{htcat $gitfs/$ref/msg}
 echo '	<p>
-	<a href="/'$gituser/$repo/$refname'/patch">Download patch</a><br/>
+	<a href="/'$gituser/$repo/$refname'/_patch">Download patch</a><br/>
 	</p>
 	<p>
 	<b>ref:</b> <a href="/'$gituser/$repo/$refname'/files.html">'$refname'</a><br/>'