shithub: shithub

Download patch

ref: 1de670f1a9763e518a7c9bdef1e190781f3864d9
parent: a37cd7799c48b7a5bec13c3cea6625b3bffd171e
author: Ori Bernstein <[email protected]>
date: Sun Nov 29 12:07:30 EST 2020

support git-named description files

Git has a convention of 'description' in the repository,
but I picked 'desc' for the file name. There's no reason
for this divergence, so the admin tools defaults to
'description', and the viewer accepts both.

--- a/newrepo
+++ b/newrepo
@@ -19,7 +19,7 @@
 	if(~ $#priv 0)
 		touch $1/.git/webpublish
 	if(! ~ $#desc 0)
-		echo $desc >$1/.git/desc
+		echo $desc >$1/.git/description
 	if(! ~ $#contact 0)
 		echo $contact >$1/.git/contact
 }
--- a/shithub
+++ b/shithub
@@ -92,6 +92,8 @@
 			echo '<dd>'
 			if(test -f $repo/.git/desc)
 				htcat $repo/.git/desc
+			if not if(test -f $repo/.git/desc)
+				htcat $repo/.git/desc
 			if not
 				echo 'code some guy wrote'
 			echo '</dd>'
@@ -176,6 +178,8 @@
 		htcat README.md
 	if not if(test -f $repodir/desc)
 		htcat $repodir/desc
+	if not if(test -f $repodir/description)
+		htcat $repodir/description
 	if not
 		echo 'this repo has no description'
 	echo '