shithub: git9

ref: 611d84fcf2eb51eff7281321f45d9c8953340a4e
dir: /common.rc/

View raw version
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
	git/fs
}