Wrong, misleading error message when "branch.<name>.merge" is invalid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux