]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-svn: allow 'init' to work outside of tests
authorEric Wong <normalperson@yhbt.net>
Tue, 23 Jan 2007 19:35:53 +0000 (11:35 -0800)
committerEric Wong <normalperson@yhbt.net>
Fri, 23 Feb 2007 08:57:09 +0000 (00:57 -0800)
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 <normalperson@yhbt.net>
git-svn.perl

index 2e3d35527e836bea2bb7a30fb6b39387ed3621a3..a70e7b911014b0b74e8e263ca888a911d41405d7 100755 (executable)
@@ -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*$!) {