aboutsummaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-04-17 02:41:43 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-17 03:33:22 -0700
commitc284914a7c6646ddf999d3df7924b10f06ac6979 (patch)
tree11b5b620915dfa3852dd5831531bd5e41a05869e /git-svn.perl
parentd627de6b13138257dac3fcb4d7778d8afdcab974 (diff)
downloadgit-c284914a7c6646ddf999d3df7924b10f06ac6979.tar.gz
git-c284914a7c6646ddf999d3df7924b10f06ac6979.tar.xz
git-svn: quiet some warnings when run only with --version/--help
These are harmless but annoying. They were introduced in 512b620bd9fef7f170562ecad835e37479f051ce Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.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 7ebd07b79..4d3c453bf 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -168,14 +168,14 @@ for (my $i = 0; $i < @ARGV; $i++) {
my %opts = %{$cmd{$cmd}->[2]} if (defined $cmd);
read_repo_config(\%opts);
-Getopt::Long::Configure('pass_through') if $cmd eq 'log';
+Getopt::Long::Configure('pass_through') if ($cmd && $cmd eq 'log');
my $rv = GetOptions(%opts, 'help|H|h' => \$_help, 'version|V' => \$_version,
'minimize-connections' => \$Git::SVN::Migration::_minimize,
'id|i=s' => \$Git::SVN::default_ref_id,
'svn-remote|remote|R=s' => sub {
$Git::SVN::no_reuse_existing = 1;
$Git::SVN::default_repo_id = $_[1] });
-exit 1 if (!$rv && $cmd ne 'log');
+exit 1 if (!$rv && $cmd && $cmd ne 'log');
usage(0) if $_help;
version() if $_version;