summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-12-19 08:31:43 (GMT)
committerEric Wong <normalperson@yhbt.net>2007-12-19 08:33:15 (GMT)
commit540424b263d626aa762757a31ca9b4becc7fb513 (patch)
tree0e70f6c16f42e5a4f5b68e6ae970cd6cb39c9796 /git-svn.perl
parent7fc35e0e94782bbbefb920875813519038659930 (diff)
downloadgit-540424b263d626aa762757a31ca9b4becc7fb513.zip
git-540424b263d626aa762757a31ca9b4becc7fb513.tar.gz
git-540424b263d626aa762757a31ca9b4becc7fb513.tar.bz2
git-svn: avoid warning when run without arguments
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>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 41fedf5..c51f1e7 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -197,8 +197,8 @@ for (my $i = 0; $i < @ARGV; $i++) {
}
};
-# 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, ",