git-svn: ensure we're at the top-level and can access $GIT_DIR
authorEric Wong <normalperson@yhbt.net>
Tue, 20 Feb 2007 09:36:30 +0000 (01:36 -0800)
committerEric Wong <normalperson@yhbt.net>
Fri, 23 Feb 2007 08:57:13 +0000 (00:57 -0800)
commit5253dc33b713e3de63a25305bfc5e966999a0fbe
treec5568c94ca7a689a4c234798223165140aad7c89
parent1a97a506043691741f25e8967e76123c1114d1fb
git-svn: ensure we're at the top-level and can access $GIT_DIR

If we are run inside a subdirectory of a working tree, we'll
chdir to the top first before touching anything.  This also
prevents the accidental creation of .git directories inside
subdirectories since they need metadata.

Noticed by maio on #git

Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl