Re: [ANNOUNCE] Git v2.0.0-rc0

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [ANNOUNCE] Git v2.0.0-rc0

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:00:47

The following message is a courtesy copy of an article
that has been posted to gmane.comp.version-control.git as well.

Jonathan Nieder [off-list ref] writes:
Hm, perhaps we should introduce a 'no-prefix' option to work around
this.
...
quoted
|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 = "" },
quoted
                    '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?
I do not think that it is a good idea to use "--no-anything" for
something that is not a boolean.

I can buy "--old-default-prefix", or "--empty-prefix", but running
"git svn --prefix ''" (or "--prefix=''") would be OK and logically
consistent anyway (i.e. the option tells us what string to add after
"refs/remotes/", and the old default that everybody hated were to
use an empty string), so...

Re: [ANNOUNCE] Git v2.0.0-rc0

From: Jonathan Nieder <hidden>
Date: 2016-06-15 23:00:47

Junio C Hamano wrote:
Jonathan Nieder [off-list ref] writes:
quoted
Hm, perhaps we should introduce a 'no-prefix' option to work around
this.
[...]
quoted
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?
I do not think that it is a good idea to use "--no-anything" for
something that is not a boolean.
Do you mean it is a bad idea to support or a bad idea to make use of
such support?

I suggested --no- for consistency with current git commands that use
parseopt.  But on second thought, I agree that it be confusing for

	--prefix=foo --no-prefix

to mean something different from no --prefix parameter at all.

The documentation says

	--prefix=<prefix>

		...

		Before Git 2.0, the default prefix was "" (no prefix).
		This meant that ...

which suggests that I can use --prefix="" to mean no prefix.  Perhaps
it needs a note to suggest using '--prefix ""' instead?

Thanks,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help