On Thu, 21 Dec 2006, Junio C Hamano wrote: > Nicolas Pitre <nico@xxxxxxx> writes: > > > $ git pull origin/next > > fatal: The remote end hung up unexpectedly > > Cannot get the repository state from git://git.kernel.org/pub/scm/git/git.git/next > > > > [ WTF? Where that ...pub/scm/git/git.git/next comes from? Hmmm... ] > > This comes from ancient request by Linus to allow: > > $ cat .git/remotes/jgarzik > URL: master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/ > $ git pull jgarzik/misc-2.6 > > See http://article.gmane.org/gmane.comp.version-control.git/6181 > for the full text. > > Personally I thought this was confusing when I implemented it > the first time, and I still find it confusing. > > I suspect nobody uses it. I am all for removing this "URL > prefix shorthand" feature in v1.5.0. Please do. I'm sure Linus can find a better way now. > > $ git pull . remotes/origin/next > > Already up-to-date. > > > > [ Woooh! But since I always hated this syntax let's try merge instead. ] > > > > $ git merge origin/next > > Already up-to-date. > > Yes, that is one of the reasons that you would prefer 'merge' > when you are working locally. Sure. But why doesn't pull accept "origin/next"? > > $ git pull origin > > Warning: No merge candidate found because value of config option > > "branch.local_next.merge" does not match any remote branch fetched. > > No changes. > > > > So this means that branch.local_next.merge should be set to origin/next? > > No, the message says "any REMOTE branch" -- refs/heads/next is > what it is called at the remote, and that is how the value is > expected to be spelled; I think somebody added an example to > config.txt recently to stress this. The above error messasge > obviously was not clear enough. Rewording appreciated. But wouldn't it be much less confusing if it used the local name for that remote branch instead? After all it is what should be used with git-merge if performed manually, it is what diff, log, and al must use as well. Why would this need a remote name for something that is a local operation after all? I think "refs/heads/master" is really ambigous since you might be confused between the local and remote meaning of it, whereas "origin/master" carries no confusion at all. Nicolas - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html