Thread (8 messages) flat view 8 messages, 8 authors, 2016-06-15

Re: git annoyances

From: Jean-Christian de Rivaz <hidden>
Date: 2016-06-15 22:44:28

Junio C Hamano a écrit :
That made us allowing the users to type "git pull" and "git fetch" without
parameters.  This is generally a good thing: shorter to type for doing
common things is always good, as long as the user knows what he is doing.

But at the same time, this allowed docs and cheat-sheets that mention only
the form without parameters and not the normative "repository refspec"
form.  This dumbed down the users not understand that in that context
fetch (and pull, which is a fetch followed by a merge) is always happening
against a single branch of single remote repository, the way to name
remote repository and its branch(es) is to give them as separate
parameters, and their not typing the pair explicitly is a mere convenience
feature.  This particular aspect of the shorthand is actually very bad.
It makes the mental model fuzzy, and hiding important rules of how the
world works from new people would lead them to unnecessary confusion.  In
short, we made it harder for the new people to "get" it.
A possible way it to, by default, make git print the full form of the 
command when a short form is used. So the user see the concept without 
having to read the documentation and learn it gradually. I personally 
like tools that act this way. It permit to make a basic and easy 
tutorial with short commands that let know the general concept and show 
the full potential of the tool.

A "short form" flag in a user (not repository) configuration file should 
allow to suppress the long form printout for the comfort of the users 
that don't want it.

--
Jean-Christian de Rivaz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help