#!/bin/rc . /sys/lib/shithub/common.rc cd $1 shift rfork ne nl=' ' gituser=$1 repo=$2 refname=HEAD repons $gituser $repo repodir=/mnt/$repo/.git if(! ref=`{resolveref $refname}){ echo 'invalid ref '$refname'' exit } if(test -f $gitfs/$ref/hash) hash=`{cat $gitfs/$ref/hash} if not hash=$ref http_response user_prelude $gituser $repo $hash echo '

Clone

clone: git://'$host/$gituser/$repo' gits://'$host/$gituser/$repo'
push: hjgit://'$host/$gituser/$repo'
' if(test -f $repodir/contact) echo ' patches to: '^`$nl{cat $repodir/contact}^'
' echo '
' if(test -f $gitfs/object/$hash/msg){ echo '

Last commit

' formatcommit $gituser $repo $hash } cd $gitfs/object/$hash/tree echo '

About

'
if(test -f $repodir/README)
	htcat $repodir/README
if not if(test -f README)
	htcat README
if not if (test -f README.md)
	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 '
	
'