From: Shawn Pearce <spearce@spearce.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Petr Baudis <pasky@suse.cz>,
Stephen Hemminger <shemminger@osdl.org>,
Jeff Garzik <jgarzik@pobox.com>,
git@vger.kernel.org
Subject: Re: git pull for update of netdev fails.
Date: Wed, 20 Sep 2006 12:59:31 -0400 [thread overview]
Message-ID: <20060920165931.GE23260@spearce.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0609200902190.4388@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> wrote:
> The thing is, if you don't understand how rebasing etc destroys history,
> you may do things like do a "git pull" or a "git merge" of a branch that
> the other side WILL THROW AWAY! That will later result in major pain,
> because when you then try to merge it later, you will get all kinds of
> nasty behaviour, because the history you merged earlier no longer matches
> the history you're now trying to merge again, and the work you merged
> earlier is simply not there any more.
Yet people (typically those new to Git) will still pull or merge
the wrong branch in, work on top of that merge, publish it, others
will build on that... and wham; that topic branch head which you
wanted to rebase prior to merging is now wedged 50 commits deep in
your history.
Just yesterday I found such a case in a shared repository. Now I
have a branch wedged in our shared mainline that I can't get out
and shouldn't have been there in the first place.
If only the shared repository had a way of advising clients that
commits stored in ref 'BAAAD' may not survive and thus shouldn't
be merged. So that git-merge wouldn't let you merge them in.
Unfortunately there isn't a way to do this that's sane so I'm not
even going to try.
Probably what I should have done (now that I think about it) was to
put a check into our update hook on the shared repository to look for
a rebaseable branch (which are listed in some info file) being pushed
into a non-rebaseable one. If that happens then abort the update.
Unfortunately our current Git client (1.4.2)/Git server version(1.3.1)
combinations means we get no output from our update hook when it
fails, so I can't tell the newbie what they did wrong.
--
Shawn.
next prev parent reply other threads:[~2006-09-20 16:59 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
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-23 4:18 ` Petr Baudis
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 [this message]
2006-09-20 17:34 ` Linus Torvalds
2006-09-20 23:12 ` Krzysztof Halasa
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=20060920165931.GE23260@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=jgarzik@pobox.com \
--cc=pasky@suse.cz \
--cc=shemminger@osdl.org \
--cc=torvalds@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.