git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Wrong, misleading error message when "branch.<name>.merge" is invalid
@ 2009-03-11 12:27 Matthieu Poullet
  0 siblings, 0 replies; only message in thread
From: Matthieu Poullet @ 2009-03-11 12:27 UTC (permalink / raw)
  To: git

Hi,

today I've tried to update a repo I haven't used for a while (see
complete log below).
When trying to pull changes for my remote tracking branch, I've got an
error message suggesting that my config was wrong instead of
suggesting that this branch was gone on the remote.

As people (thanks to them) explain me on #git, fetch doesn't remove
stale tracking branches, and so in this case the error message is
pretty misleading.
Maybe "Error: ref 'refs/heads/omap3' does not exist in remote repo
'origin'" (suggested by Ilari on #git) would be more appropriate?

Regards,
Matthieu.

mpoullet@LU84-mpoullet:~/src/u-boot-arm$ git branch -a
* master
  omap3
  origin/20070326_ene
  origin/HEAD
  origin/master
  origin/mm
  origin/next
  origin/old-next
  origin/omap3
  origin/testing
mpoullet@LU84-mpoullet:~/src/u-boot-arm$ git pull
Already up-to-date.
mpoullet@LU84-mpoullet:~/src/u-boot-arm$ git checkout omap3
Switched to branch "omap3"
mpoullet@LU84-mpoullet:~/src/u-boot-arm$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.omap3.merge' in
your configuration file does not tell me either. Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.

If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:

    branch.omap3.remote = <nickname>
    branch.omap3.merge = <remote-ref>
    remote.<nickname>.url = <url>
    remote.<nickname>.fetch = <refspec>

See git-config(1) for details.
mpoullet@LU84-mpoullet:~/src/u-boot-arm$ cat .git/config
[core]
  repositoryformatversion = 0
  filemode = true
  bare = false
  logallrefupdates = true
[remote "origin"]
  url = git://git.denx.de/u-boot-arm.git
  fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
  remote = origin
  merge = refs/heads/master
[branch "omap3"]
  remote = origin
  merge = refs/heads/omap3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-11 12:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11 12:27 Wrong, misleading error message when "branch.<name>.merge" is invalid Matthieu Poullet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).