#!/bin/sh

wd='./'

while [ "x`pwd`" != "x/" ] ; do
        test -d ".git" && echo "$wd" && exit 0
        wd="$wd../"
        cd ../
done

echo >&2 ".git not found"
exit 1
