From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: Emacs Development <emacs-devel@gnu.org>
Subject: Re: Bazaar migration status?
Date: Thu, 23 Jul 2009 17:14:33 +0900 [thread overview]
Message-ID: <87vdljvms6.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <4CF97BAA-1FED-45A9-BE96-2A6A68294D12@raeburn.org>
Ken Raeburn writes:
> I may have overstated it a little, but the general recommendation is
> that it's a bad idea and should be avoided if possible. For example,
> "git help rebase" tells me so:
>
> Rebasing (or any other form of rewriting) a branch that
> others have based work on is a bad idea:
"Based work on" is the key phrase. If you *know* nobody has done so,
if you know who has done so and coordinate with them, it's no big
deal, and often the best way to proceed because everybody agrees that
the branch should be rebased, it's just a question of coordinating on
*when*.
In these cases, fixing is a no-op (if there are no downstream users)
or often trivial (just rebase your working branch using the three-head
form of rebase). And it's cheap to try, just create a temporary
branch or tag to record the head of the branch you've been working on.
Note that eventually you *are* going to have to rebase, too, because
the mainline *will* proceed to use a merged branch even if they rename
it instead of rebasing it. git can (and now does) automatically warn
you about the situation if there is a rebase: you'll be told that you
can't pull because it's not a fast forward.
It's not clear to me that this is a bad thing. The alternative is
that upstream creates a new branch to avoid rebasing issues, and some
weeks later you realize that you haven't pulled any new content for
some weeks, and discover that not only have they rebased into conflict
with your work, but also the new branch itself contains a bunch of new
conflicts that you have to catch up to. Sure, you could carefully
follow the mailing list(s) to find announcements of branches related
to the one you're based off of, but IMHO this is the kind of thing I'd
like to delegate to my VCS.
> anyone downstream of it is forced to manually fix their
> history. This section explains how to do the fix from the
> downstream's point of view. The real fix, however, would be
> to avoid rebasing the upstream in the first place.
>
> This sort of ripple effect requiring manual intervention for everyone
> downstream seems... rude.
If done without coordination, sure, it's rude. Somebody who's done
the amount of work that Andreas has done to preserve history is
anything but likely to be rude, though.
> [I]t seems to be that we *do* want the content to be the same, and
> all the history info... but we're going to have a complete new
> version history anyways, because it's how the tools work today.
Hm? Uh, if the content is the same, then you haven't rebased at all.
In that case, somebody has deliberately changed the metadata of
history (eg, git-filter-branch). But you can analyze this with the
tools git (uniquely, AFAIK, cf Miles's "Tribute to a VCS" post :-)
provides:
find-tree () { git log --all --pretty='%T %H' | grep ^$1; }
which you probably want to invoke as
find-tree `git cat-file commit HEAD | grep ^tree | cut -b6-`
which will find out if there's any commit whose tree is identical to
HEAD's. Note that if this is the case, you probably can find a whole
branch which is identical to HEAD's branch in terms of content.
Footnotes:
[1] I haven't tested it properly, but that's my reading of the docs
for "git-fetch -f".
next prev parent reply other threads:[~2009-07-23 8:14 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-17 12:41 Bazaar migration status? joakim
2009-07-17 15:50 ` Stefan Monnier
2009-07-17 17:06 ` joakim
2009-07-17 17:56 ` Stefan Monnier
2009-07-19 22:55 ` Daniel Clemente
2009-07-29 16:43 ` Karl Fogel
2009-07-17 18:37 ` Chong Yidong
2009-07-19 6:50 ` Karl Fogel
2009-07-19 9:35 ` joakim
2009-07-19 10:27 ` Ken Raeburn
2009-07-20 13:35 ` Stefan Monnier
2009-07-20 13:55 ` David Reitter
2009-07-20 17:58 ` Stefan Monnier
2009-07-20 22:16 ` Miles Bader
2009-07-21 0:54 ` Stefan Monnier
2009-07-21 8:19 ` Andreas Schwab
2009-07-21 23:31 ` Ken Raeburn
2009-07-22 7:19 ` David Reitter
2009-07-22 21:33 ` Andreas Schwab
2009-07-22 23:46 ` Ken Raeburn
2009-07-23 3:49 ` Stephen J. Turnbull
2009-07-23 5:13 ` Miles Bader
2009-07-23 5:34 ` Ken Raeburn
2009-07-23 8:14 ` Stephen J. Turnbull [this message]
2009-07-23 22:06 ` Ken Raeburn
2009-07-24 2:43 ` Stephen J. Turnbull
2009-07-24 8:45 ` Ken Raeburn
2009-07-24 11:13 ` Stephen J. Turnbull
2009-07-23 7:53 ` Andreas Schwab
2009-07-20 22:14 ` Christian Faulhammer
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=87vdljvms6.fsf@uwakimon.sk.tsukuba.ac.jp \
--to=stephen@xemacs.org \
--cc=emacs-devel@gnu.org \
--cc=raeburn@raeburn.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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.