Thread (5 messages) flat view 5 messages, 3 authors, 2021-07-12

Re: PATCH: improve git switch documentation

From: Felipe Contreras <hidden>
Date: 2021-07-12 17:09:26

Martin wrote:
On 12/07/2021 18:24, Felipe Contreras wrote:
quoted
Sergey Organov wrote:
Even standardizing `git branch` would be an almost-impossible task, even
if we manage to convince others. `git new branch` even more impossible.
Not sure but from the glance at hg that I took, they seem to use the 
plural for nouns.

So then we could have

   git branch <new-branch-name>

   git branches new   // long version
   git branches list
   git branches delete
   ....

However, standardizing to a fixed verb/noun rule will still be more than 
a challenge.

The above would as guildeline be

   git verb
or
   git plural-noun verb
I don't see what's wrong with considering the second form a subcommand:

  git $subcommand $verb

Like `git bisect start`. That way you could consider `branches` to be a
subcommand, it doesn't need to be a plural noun.
Yet try to do that with
   git status
   git log

I don't see how a better alternative for those can be found. One that 
actually is accepted because it's better, not just because it follows a 
rule.

status, is not a verb
log is the wrong verb, or again a noun.
If `git branch` is a shorthand for `git branches new`, the you could
consider `git status` to be the a shortcut for `git status show`, but
since there's no other action to be done with the status subcommand,
then it's always implied.

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help