git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Poullet <matthieu.poullet@gmail.com>
To: git@vger.kernel.org
Subject: Wrong, misleading error message when "branch.<name>.merge" is invalid
Date: Wed, 11 Mar 2009 13:27:47 +0100	[thread overview]
Message-ID: <80a0c20d0903110527s1fed1f36wf33446220f6628ac@mail.gmail.com> (raw)

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

                 reply	other threads:[~2009-03-11 12:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80a0c20d0903110527s1fed1f36wf33446220f6628ac@mail.gmail.com \
    --to=matthieu.poullet@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).