#!/bin/rc -e . /sys/lib/shithub/common.rc cd $1 shift rfork ne nl=' ' gituser=$1 repo=$2 refname=$3 repons $gituser $repo if(! ref=`{resolveref $refname}){ echo 'invalid ref '$refname'' exit } user_prelude $gituser $repo $refname oldcommit=`{cat $gitfs/$ref/parent} author=`''{htcat $gitfs/$ref/author} date=`''{date `{mtime $gitfs/$ref/msg | awk '{print $1}'}} msg=`''{htcat $gitfs/$ref/msg} echo '
ref: '$refname'
'
if(! ~ $#oldcommit 0) {
echo 'parent: '$oldcommit'
'
}
echo ' author: '$author'
date: '$date'
'$msg'