git-svn: avoid warning when run without arguments
authorEric Wong <normalperson@yhbt.net>
Wed, 19 Dec 2007 08:31:43 +0000 (00:31 -0800)
committerEric Wong <normalperson@yhbt.net>
Wed, 19 Dec 2007 08:33:15 +0000 (00:33 -0800)
While we're in the area, finish writing a halfway-written
comment describing what that block does...

Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl
index 41fedf5979da140bd329b11d47bd8a2c53335ee2..c51f1e7391348b1d063a505ce41e5988888bae2d 100755 (executable)
@@ -197,8 +197,8 @@ BEGIN
        }
 };
 
-# make sure we're always running
-unless ($cmd =~ /(?:clone|init|multi-init)$/) {
+# make sure we're always running at the top-level working directory
+unless ($cmd && $cmd =~ /(?:clone|init|multi-init)$/) {
        unless (-d $ENV{GIT_DIR}) {
                if ($git_dir_user_set) {
                        die "GIT_DIR=$ENV{GIT_DIR} explicitly set, ",