{"thread":{"id":"18265","subject":"Wrong, misleading error message when \"branch.<name>.merge\" is invalid","startedAt":"2009-03-11T12:27:47Z","lastAt":"2009-03-11T12:27:47Z","messageCount":1,"participants":["Matthieu Poullet"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"107681","messageId":"80a0c20d0903110527s1fed1f36wf33446220f6628ac@mail.gmail.com","threadId":"18265","inReplyTo":null,"subject":"Wrong, misleading error message when \"branch.<name>.merge\" is invalid","fromName":"Matthieu Poullet","fromEmail":"matthieu.poullet@gmail.com","sentAt":"2009-03-11T12:27:47Z","receivedAt":"2009-03-11T12:27:47Z","isPatch":false,"sender":{"key":"matthieu.poullet@gmail.com","avatar":null},"body":"Hi,\n\ntoday I've tried to update a repo I haven't used for a while (see\ncomplete log below).\nWhen trying to pull changes for my remote tracking branch, I've got an\nerror message suggesting that my config was wrong instead of\nsuggesting that this branch was gone on the remote.\n\nAs people (thanks to them) explain me on #git, fetch doesn't remove\nstale tracking branches, and so in this case the error message is\npretty misleading.\nMaybe \"Error: ref 'refs/heads/omap3' does not exist in remote repo\n'origin'\" (suggested by Ilari on #git) would be more appropriate?\n\nRegards,\nMatthieu.\n\nmpoullet@LU84-mpoullet:~/src/u-boot-arm$ git branch -a\n* master\n  omap3\n  origin/20070326_ene\n  origin/HEAD\n  origin/master\n  origin/mm\n  origin/next\n  origin/old-next\n  origin/omap3\n  origin/testing\nmpoullet@LU84-mpoullet:~/src/u-boot-arm$ git pull\nAlready up-to-date.\nmpoullet@LU84-mpoullet:~/src/u-boot-arm$ git checkout omap3\nSwitched to branch \"omap3\"\nmpoullet@LU84-mpoullet:~/src/u-boot-arm$ git pull\nYou asked me to pull without telling me which branch you\nwant to merge with, and 'branch.omap3.merge' in\nyour configuration file does not tell me either. Please\nname which branch you want to merge on the command line and\ntry again (e.g. 'git pull <repository> <refspec>').\nSee git-pull(1) for details on the refspec.\n\nIf you often merge with the same branch, you may want to\nconfigure the following variables in your configuration\nfile:\n\n    branch.omap3.remote = <nickname>\n    branch.omap3.merge = <remote-ref>\n    remote.<nickname>.url = <url>\n    remote.<nickname>.fetch = <refspec>\n\nSee git-config(1) for details.\nmpoullet@LU84-mpoullet:~/src/u-boot-arm$ cat .git/config\n[core]\n  repositoryformatversion = 0\n  filemode = true\n  bare = false\n  logallrefupdates = true\n[remote \"origin\"]\n  url = git://git.denx.de/u-boot-arm.git\n  fetch = +refs/heads/*:refs/remotes/origin/*\n[branch \"master\"]\n  remote = origin\n  merge = refs/heads/master\n[branch \"omap3\"]\n  remote = origin\n  merge = refs/heads/omap3\n"}]}