From: Linus Torvalds <torvalds@osdl.org>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: Jeff Garzik <jgarzik@pobox.com>, git@vger.kernel.org
Subject: Re: git pull for update of netdev fails.
Date: Wed, 20 Sep 2006 08:28:08 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0609200816400.4388@g5.osdl.org> (raw)
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
next prev parent reply other threads:[~2006-09-20 15:33 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-20 15:03 git pull for update of netdev fails Stephen Hemminger
2006-09-20 15:28 ` Linus Torvalds [this message]
2006-09-20 15:54 ` Petr Baudis
2006-09-20 16:02 ` Johannes Schindelin
2006-09-20 16:07 ` Petr Baudis
2006-09-20 16:19 ` Linus Torvalds
2006-09-20 16:26 ` Linus Torvalds
2006-09-20 16:34 ` Shawn Pearce
2006-09-20 16:49 ` Linus Torvalds
2006-09-20 17:10 ` Shawn Pearce
2006-09-20 21:23 ` Johannes Schindelin
2006-09-20 21:27 ` Shawn Pearce
2006-09-20 21:37 ` Johannes Schindelin
2006-09-20 21:42 ` Junio C Hamano
2006-09-20 21:53 ` Johannes Schindelin
2006-09-20 21:53 ` Shawn Pearce
2006-09-20 21:49 ` Shawn Pearce
2006-09-20 16:28 ` Shawn Pearce
2006-09-20 16:38 ` Linus Torvalds
2006-09-20 21:14 ` Johannes Schindelin
2006-09-20 21:21 ` Shawn Pearce
2006-09-20 21:27 ` Johannes Schindelin
2006-09-20 21:40 ` Shawn Pearce
2006-09-20 22:34 ` Jakub Narebski
2006-09-23 3:44 ` Petr Baudis
2006-09-23 4:00 ` Shawn Pearce
2006-09-23 4:09 ` Petr Baudis
2006-09-23 13:15 ` Catalin Marinas
2006-09-23 13:10 ` Catalin Marinas
2006-09-24 20:54 ` Petr Baudis
2006-09-25 12:47 ` Catalin Marinas
2006-09-20 16:05 ` Junio C Hamano
2006-09-20 16:18 ` Petr Baudis
2006-09-20 16:33 ` Linus Torvalds
2006-09-20 20:01 ` Jakub Narebski
2006-09-20 16:15 ` Linus Torvalds
2006-09-20 16:59 ` Shawn Pearce
2006-09-20 17:34 ` Linus Torvalds
2006-09-20 23:12 ` Krzysztof Halasa
2006-09-23 4:18 ` Petr Baudis
2006-09-20 19:58 ` Jakub Narebski
2006-09-21 9:14 ` Johannes Schindelin
2006-09-20 19:24 ` Jeff Garzik
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=Pine.LNX.4.64.0609200816400.4388@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=jgarzik@pobox.com \
--cc=shemminger@osdl.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).