Kyle J. McKay wrote:

> The problem with --prefix="" is this (from the Getopt::Long CHANGES file):
>
> Changes in version 2.37
> -----------------------
>
>  * Bugfix: With gnu_compat, --foo= will no longer trigger "Option
>    requires an argument" but return the empty string.
>
> The system I ran the tests on happens to have Getopt::Long version 2.35.

Thanks for catching it.

Getopt::Long was updated to 2.37 in perl 5.8.9 (in 5.8.8 it was
updated to 2.35).  INSTALL still only recommends Perl 5.8 so that's an
issue.

> The --prefix="" option can be rewritten --prefix "" in both tests and then  
> they pass.

Hm, perhaps we should introduce a 'no-prefix' option to work around
this.

> |diff --git a/git-svn.perl b/git-svn.perl
> |index 7349ffea..284f458a 100755
> |--- a/git-svn.perl
> |+++ b/git-svn.perl
> |@@ -149,7 +149,7 @@ my ($_trunk, @_tags, @_branches, $_stdlayout);
>   my %icv;
>   my %init_opts = ( 'template=s' => \$_template, 'shared:s' => \$_shared,
>                     'trunk|T=s' => \$_trunk, 'tags|t=s@' => \@_tags,
>                     'branches|b=s@' => \@_branches, 'prefix=s' => \$_prefix,
  +                   'no-prefix' => sub { $_prefix = "" },

>                     'stdlayout|s' => \$_stdlayout,
>                     'minimize-url|m!' => \$Git::SVN::_minimize_url,
>                    'no-metadata' => sub { $icv{noMetadata} = 1 },

That way, normal usage of --prefix would still be consistent with
other git commands that prefer the form with argument attached
(--prefix=foo, not --prefix foo; see gitcli(7)).

Thoughts?
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to