git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git pull error message woes

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jun 19, 2008, 18:57 UTC
Message-ID
<alpine.LNX.1.00.0806191446590.19665@iabervon.org>
In-Reply-To
<1213860773.6444.9.camel@localhost>
On Thu, 19 Jun 2008, Matthias Kestenholz wrote:
Show 15 quoted lines
> Hi,
> 
> I noticed strange behavior while pulling git.git today (this isn't new,
> it just occurred to me for the first time today that there is something
> wrong going on)
> 
> I run the 'pu' branch most of the time, and do not create a local branch
> because 'pu' is constantly rebased. I just run git checkout origin/pu
> after pulling (I know I should fetch if I don't want to fetch+merge, but
> it's hard to retrain the fingers)
> 
> Although I am on no branch ($curr_branch is empty), I get the error
> message from error_on_no_merge_candidates instead of being notified that
> I am on no branch currently. Something around line 150-160 in
> git-pull.sh does not seem to work as it should.

There's no reason you couldn't pull when on no branch. It's just that, without a branch, there's nowhere to get a default ref to merge, which leads to having nothing to merge (if you don't give anything specific), which leads to that error.

On the other hand, you could do:
 git pull <some URL> <some branch>

and git would happily merge the specified branch of the specified repository for you. So the reason that git-pull doesn't give you the error you expect is that that's not necessarily an error at all.

	-Daniel
*This .sig left intentionally blank*
Previous: Matthias Kestenholz
Message 2 of 2 in “git pull error message woes”
  1. Matthias KestenholzJun 19, 2008
  2. Daniel BarkalowJun 19, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.