Skip to content

Commit 540424b

Browse files
author
Eric Wong
committed
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>
1 parent 7fc35e0 commit 540424b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-svn.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ BEGIN
197197
}
198198
};
199199

200-
# make sure we're always running
201-
unless ($cmd =~ /(?:clone|init|multi-init)$/) {
200+
# make sure we're always running at the top-level working directory
201+
unless ($cmd && $cmd =~ /(?:clone|init|multi-init)$/) {
202202
unless (-d $ENV{GIT_DIR}) {
203203
if ($git_dir_user_set) {
204204
die "GIT_DIR=$ENV{GIT_DIR} explicitly set, ",

0 commit comments

Comments
 (0)