You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@wandisco.com> on 2010/10/25 12:16:29 UTC
svn patch --strip-count=N or svn patch --strip=N?
Do we need both "--strip-count" and "--strip" as aliases? I think
"--strip" is sufficient; the word "count" doesn't add much. "--strip"
matches GNU patch. Fewer aliases -> better.
?
- Julian
Re: svn patch --strip-count=N or svn patch --strip=N?
Posted by Beware of Bikesheds <d....@daniel.shahaf.name>.
Stefan Sperling wrote on Mon, Oct 25, 2010 at 16:13:58 +0200:
> On Mon, Oct 25, 2010 at 09:50:41AM -0400, C. Michael Pilato wrote:
> > I don't think it's so terribly important to match the 'patch' command's
> > option name with our option's primary name, but it's a nice-to-have
> > achievable via the option aliases. If we're going to go that route, though,
> > then we should choose an option's primary name as if there was nothing else
> > to model after. I mean, is --strip-count as descriptive as it can be, or
> > would something else serve better? --strip-components-count?
> > --ignore-path-components-count?
>
> The need for such long names originates from the fact that options in
> Subversion are global, rather than specific to a subcommand.
> Because option names by themselves aren't tied to a context it's hard to
> predict whether some other subcommand might want to use the same or a
> similarly named option some day.
>
> Anyway, let's keep aliases as short-hands for interactive use, rather
> than as alternative long-option names. I'm fine with renaming
> --strip-count to --strip and aliasing it to --st. Or maybe not even
> bother with aliasing it since --strip is reasonably short anyway.
>
+1.
Perhaps do the same to --show-diff and --diff?
And removing the word 'patch' from 'opt_old_patch_target_names'?
> Stefan
Re: svn patch --strip-count=N or svn patch --strip=N?
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Oct 25, 2010 at 10:46:52AM -0400, C. Michael Pilato wrote:
> We can always rename an API variable. :-)
But not without having a huge bikeshed discussion about the new name first! :)
Re: svn patch --strip-count=N or svn patch --strip=N?
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 10/25/2010 10:13 AM, Stefan Sperling wrote:
>>> The --strip-count name matches the variable name in the code.
>>
>> Er... This is a non-reason. :-)
>
> It's not a non-reason because there is no good reason for not naming
> things in a consistent way.
>
> Consistency between the API and the CLI interface is good.
> It's not terribly important, but consistency in naming things does make
> a difference if you try to follow a code path from the very top (CLI
> client) to the very bottom of Subversion (e.g. libsvn_wc).
> Any inconsistency your encounter during that journey presents a mental
> hoop you need to jump through in order to continue the journey.
Preaching to the choir, brother. You'll never find a more vocal supporter
of consistency than ol' C-Mike.
But target audience matters, too. There are millions of Subversion users.
There are quite a bit fewer direct consumers of Subversion's API. If
consistency is achievable while appealing to both audiences, great -- but
let it be the multi-millions who get first pick of the name that works best,
not the perhaps only hundreds who work with the API. We can always rename
an API variable. :-)
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: svn patch --strip-count=N or svn patch --strip=N?
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Mon, Oct 25, 2010 at 9:13 AM, Stefan Sperling <st...@elego.de> wrote:
...
> It's not a non-reason because there is no good reason for not naming
> things in a consistent way.
ENEGOVERFLOW
:)
-Hyrum
Re: svn patch --strip-count=N or svn patch --strip=N?
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Oct 25, 2010 at 09:50:41AM -0400, C. Michael Pilato wrote:
> On 10/25/2010 09:39 AM, Stefan Sperling wrote:
> > On Mon, Oct 25, 2010 at 01:16:29PM +0100, Julian Foad wrote:
> >> Do we need both "--strip-count" and "--strip" as aliases? I think
> >> "--strip" is sufficient; the word "count" doesn't add much. "--strip"
> >> matches GNU patch. Fewer aliases -> better.
> >
> > The word "count" adds something when you're looking at all options
> > in isolation of their subcommands (option names are global).
>
> I agree, to a point. It's not as if we display the --strip-count option
> anywhere except in the usage message of the one context where it is valid,
> though.
>
> > The --strip-count name matches the variable name in the code.
>
> Er... This is a non-reason. :-)
It's not a non-reason because there is no good reason for not naming
things in a consistent way.
Consistency between the API and the CLI interface is good.
It's not terribly important, but consistency in naming things does make
a difference if you try to follow a code path from the very top (CLI
client) to the very bottom of Subversion (e.g. libsvn_wc).
Any inconsistency your encounter during that journey presents a mental
hoop you need to jump through in order to continue the journey.
> I don't think it's so terribly important to match the 'patch' command's
> option name with our option's primary name, but it's a nice-to-have
> achievable via the option aliases. If we're going to go that route, though,
> then we should choose an option's primary name as if there was nothing else
> to model after. I mean, is --strip-count as descriptive as it can be, or
> would something else serve better? --strip-components-count?
> --ignore-path-components-count?
The need for such long names originates from the fact that options in
Subversion are global, rather than specific to a subcommand.
Because option names by themselves aren't tied to a context it's hard to
predict whether some other subcommand might want to use the same or a
similarly named option some day.
Anyway, let's keep aliases as short-hands for interactive use, rather
than as alternative long-option names. I'm fine with renaming
--strip-count to --strip and aliasing it to --st. Or maybe not even
bother with aliasing it since --strip is reasonably short anyway.
Stefan
Re: svn patch --strip-count=N or svn patch --strip=N?
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 10/25/2010 09:39 AM, Stefan Sperling wrote:
> On Mon, Oct 25, 2010 at 01:16:29PM +0100, Julian Foad wrote:
>> Do we need both "--strip-count" and "--strip" as aliases? I think
>> "--strip" is sufficient; the word "count" doesn't add much. "--strip"
>> matches GNU patch. Fewer aliases -> better.
>
> The word "count" adds something when you're looking at all options
> in isolation of their subcommands (option names are global).
I agree, to a point. It's not as if we display the --strip-count option
anywhere except in the usage message of the one context where it is valid,
though.
> The --strip-count name matches the variable name in the code.
Er... This is a non-reason. :-)
I don't think it's so terribly important to match the 'patch' command's
option name with our option's primary name, but it's a nice-to-have
achievable via the option aliases. If we're going to go that route, though,
then we should choose an option's primary name as if there was nothing else
to model after. I mean, is --strip-count as descriptive as it can be, or
would something else serve better? --strip-components-count?
--ignore-path-components-count?
*shrug*
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: svn patch --strip-count=N or svn patch --strip=N?
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Oct 25, 2010 at 01:16:29PM +0100, Julian Foad wrote:
> Do we need both "--strip-count" and "--strip" as aliases? I think
> "--strip" is sufficient; the word "count" doesn't add much. "--strip"
> matches GNU patch. Fewer aliases -> better.
The word "count" adds something when you're looking at all options
in isolation of their subcommands (option names are global).
The --strip-count name matches the variable name in the code.
Those are two reasons I see for keeping it the way it is.
But if you'd really prefer using only the short form, that's fine
with me. I don't really care.
Stefan