Re: git annoyances

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: <git@...>
Date: Wednesday, April 9, 2008 - 5:04 pm

Ingo Molnar <mingo@elte.hu> writes:


Thanks.  It is always enlightening to see this kind of walkthru session to
learn where the UI warts are.  The ones with concrete suggestions for
improvements are even more appreciated.


You told git that "I'll interact with this other repository from now on,
so please help me with some extra settings to do so.  Namely I do not want
to keep typing it in full URL all the time so I want an abbreviated way to
tell you I am talking about this remote repository, and also I want to
have set of remote tracking branches for this one".

Maybe "remote add" is not quite the right name to convey the above
concept.


So the command did as you told it to.


You told git "I want to merge a commit into the current branch, and that
commit is called x86/latest".  Alas, no such commit exists in your
repository (yet).  Should we be saying "no such commit exists, you need to
fetch it from elsewhere first"?


"Not a git archive" should be clear enough.  You already said "remote show
x86" correctly above, and it makes me wonder why you are now saying
"x86/latest", not "x86" without "latest".

In other words, "git fetch x86".

With that, you would tell git "Hey, I've already told you what I want you
to do with this short-hand name "x86". It is the name for the long URL
I've previously given you and I want you to fetch from that repository,
and I want its branches to be stored in remote tracking branches in my
repository".

But you didn't.  You are not taking advantage of your previous "git remote
add".

I am suspecting that a cause of this confusion is partly because earlier
in 1.3.0 days we tried to make things easy for CVS migrants where they
always interact with a single "upstream" repository and with _the_ single
branch, and we were _too_ successful in doing so.

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.

The introductory documents may need to be updated to teach explicit "git
pull $repo $branch" form first, and if they are short documents, end in
introductory phase and leave the remainder to "further reading", they
should probably be fixed not talk about the shorthand form "git pull
$nick" and "git pull" without parameters at all.  That may help fixing
this mental-model breakdown.


Yes.

Because git is distributed, a branch in the global scope is named with a
pair "remote" and "branch" as two separate parameters, and we consistently
do so.  Always.  Just like you are supposed to say in your "Linus, please
pull" requests (e.g. http://article.gmane.org/gmane.linux.kernel/321590).


Yes, we need to teach "git" to do more mind-reading (I am not being
sarcastic).  There should be a pattern in common user errors that share
their roots to the same user misperception, and if we can identify that,
maybe we can make git guess what the user was really trying to do and give
better error messages than it currently does.


I'd agree that it is fair to get frustrated with this.

We actually did not have "git merge" as the first level UI citizen for
quite some time, and the way to merge in _anything_ was done with "git
pull", even within the local repository.  If you did not know "git merge"
existed, the above would have been either one of

	$ git pull ~/linux-2.6-x86.git/
	$ git pull ~/linux-2.6-x86.git/ master

and would have been nicer.  But people wanted "git merge" which is a
purely local operation, which made (and still does makes) sense.  But now
people need to know two different commands, one that works globally and
the other that works locally.

C.f.

 http://thread.gmane.org/gmane.comp.version-control.git/10778/focus=10900
 http://thread.gmane.org/gmane.comp.version-control.git/31351/focus=31528
 http://thread.gmane.org/gmane.comp.version-control.git/31351/focus=31490


Yes, I called it mind-reading above, but we are wishing for the same
thing.

by the way, because you already paid for your Shift keys, you might want
to use it consistently to enhance readability. i find it somewhat
irritating not to be able to tell where each sentence begins with enough
visual cues (i.e. full-stop, two spaces and initial capital letter) and
first person subject not spelled with capital letter i.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git annoyances, Ingo Molnar, (Wed Apr 9, 6:14 am)
Re: git annoyances, Daniel Barkalow, (Wed Apr 9, 3:21 pm)
Re: git annoyances, Ingo Molnar, (Wed Apr 9, 4:41 pm)
Re: git annoyances, Daniel Barkalow, (Thu Apr 10, 10:08 am)
Re: git annoyances, Junio C Hamano, (Wed Apr 9, 5:04 pm)
Re: git annoyances, André Goddard Rosa, (Wed Apr 9, 7:56 pm)
Re: git annoyances, Govind Salinas, (Thu Apr 10, 3:45 pm)
Re: git annoyances, Jean-Christian de Rivaz, (Thu Apr 10, 2:08 am)
Re: git annoyances, Sverre Rabbelier, (Thu Apr 10, 4:19 am)
Re: git annoyances, Jon Loeliger, (Wed Apr 9, 5:39 pm)
Re: git annoyances, Nicolas Pitre, (Wed Apr 9, 7:45 pm)
Re: git annoyances, Jeff King, (Wed Apr 9, 5:45 pm)
Re: git annoyances, Luciano Rocha, (Fri Apr 11, 6:15 am)
Re: git annoyances, Wincent Colaiuta, (Fri Apr 11, 6:27 am)
git-bisect annoyances, Ingo Molnar, (Thu Apr 10, 7:47 am)
Re: git-bisect annoyances, Junio C Hamano, (Fri Apr 11, 1:56 am)
Re: git-bisect annoyances, Christian Couder, (Fri Apr 11, 1:41 am)
Re: git-bisect annoyances, Ingo Molnar, (Fri Apr 11, 7:41 am)
Re: git-bisect annoyances, Christian Couder, (Sat Apr 12, 2:56 am)
Re: git annoyances, Jeff King, (Wed Apr 9, 10:57 am)
Re: git annoyances, Avery Pennarun, (Wed Apr 9, 1:08 pm)
Re: git annoyances, Karl , (Thu Apr 10, 4:41 am)
Re: git annoyances, Avery Pennarun, (Thu Apr 10, 11:05 am)
Re: git annoyances, Karl , (Fri Apr 11, 3:00 am)
Friendly refspecs (Was: Re: git annoyances), Teemu Likonen, (Wed Apr 9, 4:08 pm)
Re: Friendly refspecs, Junio C Hamano, (Wed Apr 9, 5:21 pm)
Re: Friendly refspecs, Teemu Likonen, (Thu Apr 10, 3:38 am)
Re: Friendly refspecs (Was: Re: git annoyances), Avery Pennarun, (Wed Apr 9, 4:32 pm)
Re: Friendly refspecs (Was: Re: git annoyances), Jeff King, (Wed Apr 9, 4:34 pm)
Re: Friendly refspecs (Was: Re: git annoyances), Teemu Likonen, (Wed Apr 9, 6:25 pm)
Re: Friendly refspecs (Was: Re: git annoyances), Jeff King, (Wed Apr 9, 6:51 pm)
Re: Friendly refspecs, Teemu Likonen, (Sun Apr 13, 5:31 am)
Re: Friendly refspecs, Jeff King, (Tue Apr 15, 11:48 pm)
Re: Friendly refspecs, Daniel Barkalow, (Wed Apr 16, 11:42 am)
Re: Friendly refspecs, Junio C Hamano, (Wed Apr 16, 12:41 am)
Re: Friendly refspecs, Jeff King, (Wed Apr 16, 12:47 am)
Re: Friendly refspecs, Jeff King, (Wed Apr 16, 12:25 am)
[PATCH] Add examples section to 'git fetch' manual, Teemu Likonen, (Sun Apr 13, 5:34 am)
Re: [PATCH] Add examples section to 'git fetch' manual, Junio C Hamano, (Sun Apr 13, 2:56 pm)
Re: [PATCH] Add examples section to 'git fetch' manual, Teemu Likonen, (Sun Apr 13, 4:05 pm)
Re: [PATCH] Add examples section to 'git fetch' manual, Junio C Hamano, (Sun Apr 13, 9:02 pm)
Re: [PATCH] Add examples section to 'git fetch' manual, Matt Graham, (Sun Apr 13, 3:48 pm)
Re: Friendly refspecs (Was: Re: git annoyances), Jeff King, (Wed Apr 9, 8:03 pm)
Re: Friendly refspecs (Was: Re: git annoyances), Jeff King, (Wed Apr 9, 8:11 pm)
Re: Friendly refspecs, Junio C Hamano, (Thu Apr 10, 3:51 am)
Re: Friendly refspecs, Jeff King, (Thu Apr 10, 4:03 am)
Re: [PATCH] git-remote: show all remotes with "git remote sh..., Johannes Schindelin, (Wed Apr 9, 12:54 pm)
Re: git annoyances, Björn, (Wed Apr 9, 6:41 am)
Re: [PATCH] When a remote is added but not fetched, tell the..., Johannes Schindelin, (Fri Apr 11, 11:21 am)
Re: [PATCH] Default to fetching a remote after adding it., Wincent Colaiuta, (Fri Apr 11, 3:36 pm)
Re: [PATCH] Default to fetching a remote after adding it., Johannes Schindelin, (Sat Apr 12, 10:33 am)
Re: [PATCH] Default to fetching a remote after adding it., Johannes Schindelin, (Sat Apr 12, 11:24 am)
Re: [PATCH] Default to fetching a remote after adding it., Stephen Sinclair, (Fri Apr 11, 3:17 pm)