From: Eric Wong Date: Tue, 23 Jan 2007 19:35:53 +0000 (-0800) Subject: git-svn: allow 'init' to work outside of tests X-Git-Tag: v1.5.1-rc1~229 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=536c4b09370f3f443fbe87284d2378fd21f94350;p=git.git git-svn: allow 'init' to work outside of tests Tests always ran 'git init' before we ran so that repo-config would always have something to read. However that does not work in real-world situations where the user expects 'git svn init' to work without running 'git init' first. Signed-off-by: Eric Wong --- diff --git a/git-svn.perl b/git-svn.perl index 2e3d35527..a70e7b911 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -725,6 +725,7 @@ sub read_all_remotes { } sub verify_remotes_sanity { + return unless -d $ENV{GIT_DIR}; my %seen; foreach (command(qw/config -l/)) { if (m!^svn-remote\.(?:.+)\.fetch=.*:refs/remotes/(\S+)\s*$!) {