@matheusbsbs / matheus-bagliano / commits / c284914a7c
Fork 0

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>

Eric Wong committed Apr 17, 2007 at 02:41 UTC c284914a7c6646ddf999d3df7924b10f06ac6979
1 file changed +2 -2
git-svn.perl
+2 -2
@@ -168,14 +168,14 @@ for (my $i = 0; $i < @ARGV; $i++) {
168 my %opts = %{$cmd{$cmd}->[2]} if (defined $cmd);
169
170 read_repo_config(\%opts);
171 -Getopt::Long::Configure('pass_through') if $cmd eq 'log';
171 +Getopt::Long::Configure('pass_through') if ($cmd && $cmd eq 'log');
172 my $rv = GetOptions(%opts, 'help|H|h' => \$_help, 'version|V' => \$_version,
173 'minimize-connections' => \$Git::SVN::Migration::_minimize,
174 'id|i=s' => \$Git::SVN::default_ref_id,
175 'svn-remote|remote|R=s' => sub {
176 $Git::SVN::no_reuse_existing = 1;
177 $Git::SVN::default_repo_id = $_[1] });
178 -exit 1 if (!$rv && $cmd ne 'log');
178 +exit 1 if (!$rv && $cmd && $cmd ne 'log');
179
180 usage(0) if $_help;
181 version() if $_version;