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

Re: git pull for update of netdev fails.

From
Linus Torvalds <torvalds@osdl.org>
Date
Sep 20, 2006, 15:28 UTC
Message-ID
<Pine.LNX.4.64.0609200816400.4388@g5.osdl.org>
In-Reply-To
<20060920080308.673a1e93@localhost.localdomain>
On Wed, 20 Sep 2006, Stephen Hemminger wrote:
> 
> This doesn't work with all the branches for some reason. Is this a git
> bug?

It's a "Jeff bug". He rebases some of his branches, and git by default refuses to throw away the old data (so if the new branch is not a fast forward, it will _not_ just silently throw away the old state).

However, you can tell git that Jeff is being difficult by marking such branches individually as being rebased.

The git archive itself has one such branch: Junio re-writes the "pu" branch all the time, and so it seldom fast-forwards nicely (the thing about a fast forward is that you do _not_ lose any old history, you only append to it, while a rebase will throw the old history away and generate new history in its place).

So for example, for git itself, you might have a "remotes" file like mine:
	[torvalds@g5 git]$ cat .git/remotes/parent 
	URL: master.kernel.org:/pub/scm/git/git
	Pull: master:parent
	Pull: next:next
	Pull: +pu:pu

which just says that the "parent" repo is the master repo for git, and notice how the "Pull: +pu:pu" line has that extra "+" at the head. That's a marker that the remote "pu" branch (which is fetched into the _local_ "pu" branch) should be updated even if it doesn't fast-forward.

So you could either mark _all_ the remote branches with the extra "+" (to say that you always want to fetch that exact state for whatever branch you're tracking), or you can ask Jeff which branches he expects to do strange things and just mark those individual ones.

> A temporary workaround is to prune the offending branches locally
> first, but that seems like a hack.

So there's a non-hack version of this as per above, and it's even documented, although hard to find (see Documentation/pull-fetch-param.txt)

		Linus
Previous: Stephen HemmingerNext: Petr Baudis
Message 2 of 43 in “git pull for update of netdev fails.”
  1. Stephen HemmingerSep 20, 2006
  2. Linus TorvaldsSep 20, 2006
  3. Petr BaudisSep 20, 2006
  4. Johannes SchindelinSep 20, 2006
  5. Petr BaudisSep 20, 2006
  6. Linus TorvaldsSep 20, 2006
  7. Linus TorvaldsSep 20, 2006
  8. Shawn PearceSep 20, 2006
  9. Linus TorvaldsSep 20, 2006
  10. Shawn PearceSep 20, 2006
  11. Johannes SchindelinSep 20, 2006
  12. Shawn PearceSep 20, 2006
  13. Johannes SchindelinSep 20, 2006
  14. Junio C HamanoSep 20, 2006
  15. Johannes SchindelinSep 20, 2006
  16. Shawn PearceSep 20, 2006
  17. Shawn PearceSep 20, 2006
  18. Shawn PearceSep 20, 2006
  19. Linus TorvaldsSep 20, 2006
  20. Johannes SchindelinSep 20, 2006
  21. Shawn PearceSep 20, 2006
  22. Johannes SchindelinSep 20, 2006
  23. Shawn PearceSep 20, 2006
  24. Jakub NarebskiSep 20, 2006
  25. Petr BaudisSep 23, 2006
  26. Shawn PearceSep 23, 2006
  27. Petr BaudisSep 23, 2006
  28. Catalin MarinasSep 23, 2006
  29. Catalin MarinasSep 23, 2006
  30. Petr BaudisSep 24, 2006
  31. Catalin MarinasSep 25, 2006
  32. Junio C HamanoSep 20, 2006
  33. Petr BaudisSep 20, 2006
  34. Linus TorvaldsSep 20, 2006
  35. Jakub NarebskiSep 20, 2006
  36. Linus TorvaldsSep 20, 2006
  37. Shawn PearceSep 20, 2006
  38. Linus TorvaldsSep 20, 2006
  39. Krzysztof HalasaSep 20, 2006
  40. Petr BaudisSep 23, 2006
  41. Jakub NarebskiSep 20, 2006
  42. Johannes SchindelinSep 21, 2006
  43. Jeff GarzikSep 20, 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.