From: Sven Verdoolaege Date: Sun, 17 Jun 2007 14:38:02 GMT Subject: Re: [PATCH 1/2] git-submodule: move cloning into a separate function Message-ID: <20070617143802.GV955MdfPADPa@greensroom.kotnet.org> In-Reply-To: On Tue, Jun 05, 2007 at 01:13:28PM +0200, Lars Hjemli wrote: > +module_clone() > +{ > + path=$1 > + url=$2 > + > + # If there already is a directory at the submodule path, > + # expect it to be empty (since that is the default checkout > + # action) and try to remove it. > + # Note: if $path is a symlink to a directory the test will > + # succeed but the rmdir will fail. We might want to fix this. > + if test -d "$path" > + then > + rmdir "$path" 2>/dev/null || > + die "Directory '$path' exist, but is neither empty nor a git repository" What makes you say that '$path' is not a git repository? skimo