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

Re: branch.pu.forcefetch

From
PRPavel Roskin <proski@gnu.org>
Date
Dec 28, 2006, 21:29 UTC
Message-ID
<1167341346.12660.17.camel@dv>
In-Reply-To
<7vfyb159dn.fsf@assigned-by-dhcp.cox.net>
Hello!
On Wed, 2006-12-27 at 13:14 -0800, Junio C Hamano wrote:
Show 15 quoted lines
> Pavel Roskin <proski@gnu.org> writes:
> 
> > For example, I clone the git repository anew, and I try to update it by
> > git-fetch a few days later.  I get an error:
> >
> > * refs/remotes/origin/pu: not updating to non-fast forward branch 'pu'
> > of git://www.kernel.org/pub/scm/git/git
> 
> Perhaps you would want something like this?
> 
> if you are using separate remote layout:
> 
> [remote "origin"]
> 	fetch = +refs/heads/pu:refs/remotes/origin/pu
> 	fetch = refs/heads/*:refs/remotes/origin/*
That works.

Actually, it's strange that I don't actually have refs/heads/pu under .git, and it doesn't get created even if I run "git-pull" or "git-pull origin pu".

I realize that I'm far behind in my understanding of GIT, but it seems to me that something is wrong in the new layout.

We have a line that says: "pull from pu branch of origin and merge it into local pu branch even if fast-forward is impossible". However, there it no local pu branch. Yet not having this line blocks updating of master branch.

It's like saying: I won't update master branch because there is another branch that you are not tracking locally, but if you were, it would not fast forward. Seems quite perverse to me.

My .git/config file is:
[core]
        repositoryformatversion = 0
        filemode = true
        logallrefupdates = true
[remote "origin"]
        url = git://www.kernel.org/pub/scm/git/git.git
        fetch = refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
-- 
Regards,
Pavel Roskin
Previous: Jakub NarebskiNext: Junio C Hamano
Message 5 of 14 in “branch.pu.forcefetch”
  1. Pavel RoskinDec 27, 2006
  2. Jakub NarebskiDec 27, 2006
  3. Junio C HamanoDec 27, 2006
  4. Jakub NarebskiDec 27, 2006
  5. Pavel RoskinDec 28, 2006
  6. Junio C HamanoDec 28, 2006
  7. 1/2 core.logallrefupdates: log remotes/ tracking branches.Junio C Hamano, Dec 29, 2006
  8. 2/2 Allow non-fast-forward of remote tracking branches in default cloneJunio C Hamano, Dec 29, 2006
  9. Shawn PearceDec 29, 2006
  10. Johannes SchindelinDec 29, 2006
  11. Pavel RoskinDec 29, 2006
  12. Junio C HamanoDec 29, 2006
  13. Pavel RoskinDec 29, 2006
  14. Shawn PearceDec 29, 2006

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.