ref: 2ac9a21dc2d4da9a4cbf82719f13a53fa1d38df7
dir: /common.rc/
nl='
'
fn die{
	>[1=2] echo $0: $*
	exit $"*
}
fn usage{
	>[1=2] echo -n 'usage:' $usage
	exit 'usage'
}
fn gitup{
	gitroot=`{git/conf -r >[2]/dev/null}
	gitrel=`{pwd | sed 's@^'$gitroot'/*@@'}
	if(~ $#gitroot 0)
		die 'not a git repository'
	if(~ $#gitrel 0)
		gitrel='.'
	cd $gitroot
	if(test -e /mnt/git/ctl && ! grep -s '^repo '$gitroot'$' /mnt/git/ctl)
		git/fs
}