Thread (89 messages) flat view 89 messages, 18 authors, 2016-08-11

Re: Cleaning up git user-interface warts

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-08-11 19:25:54

Possibly related (same subject, not in this thread)


On Thu, 16 Nov 2006, Carl Worth wrote:
On Thu, 16 Nov 2006 08:30:55 -0800 (PST), Linus Torvalds wrote:
quoted
The form I use is actually a lot simpler (conceptually) than the "short"
form.

When you do

	git pull <reponame> <branchname>
Yes, that's what the user almost always wants. The UI problem here is
that the conceptually simpler form is syntactically longer, (which
means users aren't likely to find it).
Yeah. 

And this is something I absolutely agree with. Our default branches for 
"pull" are horrible. You can "fix" it, but you can only fix it by adding 
_explicit_ branches to your .git/config file by hand, so I don't think 
that's actually a real fix at all. We should just fix the default (where 
even a "I don't know what branch you want" _error_ would be preferable 
over the current situation).

Along with the "git checkout <tag>" thing, I think these two things are 
definitely worth just fixing.
The behavior is sane, but having to always type the branch name
specifically because it never changes... that's a user-interface bug.
Yeah. Each branch should

 (a) have a "default source" initialized on the initial "clone"

 (b) have a way to set the source afterwards

 (c) error out if you do just a "git pull" or "git pull remotename" if 
     there is no default branch for the current local branch for that 
     remote.

We actually have (b) in a weak form right now ("weak" because it requires 
you to manually edit the config file: we've got the mechanism, but not a 
nice UI for it), but (a) and (c) are just broken.

And yeah, we should allow pulling into a branch that hasn't been 
initialized.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help