Skip to contentSkip to conversation

git-svn: quiet some warnings when run only with --version/--help

PATCH In review Eric Wong 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore

Eric Wong

author
#0 lore raw

PATCH 1/1 git-svn: quiet some warnings when run only with --version/--help

These are harmless but annoying. They were introduced in 512b620bd9fef7f170562ecad835e37479f051ce

---

Junio: did you miss
http://permalink.gmane.org/gmane.comp.version-control.git/44493 ?

Thanks,

 git-svn.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
git-svn.perl +2 -2
index eb3b79c..d2a5fe4 100755
@@ -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;
Signature · 1 line
Eric Wong