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 - 10:57 am

On Wed, Apr 09, 2008 at 12:14:28PM +0200, Ingo Molnar wrote:


As you figured out later, the problem was that "git remote add" doesn't
actually fetch the remote's contents: it just sets up the remote. There
is a "-f" option which does the fetch automagically after adding.

In this case, had "-f" been the default, it would have Just Worked for
you. So that's something for us to consider, but I'm not sure if we
would annoy more users who _didn't_ want the fetch.


This is another place where we might have DWYM, by seeing that your
repository name started with "<name of a remote>/" and splitting it into
"<remote> <branch>". This could affect current usage, but it seems
unlikely that people have remote names which are exact prefixes (with
trailing slash) of non-remote repositories they are trying to fetch.

Reading "git help fetch" should show you the synopsis:

  git-fetch <options> <repository> <refspec>

which maybe gives a clue about the syntax. But I think the problem here
is that there are two different syntaxes for what is _almost_ the same
thing. The ref refs/remotes/x86/latest, which you can call "x86/latest"
as a shorthand, and the (remote, refspec) pair (x86, latest).


Unless you are planning on merging this remote a lot, the common usage
is probably to just forget the remote stuff and do:

  git pull ~/linux-2.6-x86.git latest


Yes, just showing the remotes would be consistent with what other
commands do (e.g., git-branch, git-tag). I'll post a patch in a minute.


That is an annoying message. Perhaps we could notice that it looks like
a file path (because it begins with '.') and suggest "maybe you wanted
to "git pull ..."?

-Peff
--
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)