From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: Idea for rebase strategy
Date: Mon, 27 Nov 2006 00:33:54 -0800 [thread overview]
Message-ID: <7vfyc5l24t.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0611270108160.30004@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Mon, 27 Nov 2006 01:15:14 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> an idea hit me today: maybe we can make rebase work nicely with merges
> after all. We could record the original branch point and the new branch
> point for rebases.
One case that that would be simple enough, appear often enough
in real life, and would be useful in practice is this:
A---B---C---D---E topic
/ /
---X---o---Y---Z master
After forking 'topic' at 'X' and built two commits A and B, the
master has a related change in the area 'topic' works on, and a
merge to adjust is made at C. Then it builds two other commits
D and E. We should be able to rebase it on top of the master.
If we have a reliable ref-log for 'topic' that should be trivial
to do. It will be just the matter of replaying the log on top
of master. The ref-log says we committed two after we forked,
so we replay them:
A---B---C---D---E topic
/ /
---X---o---Y---Z master
\
A'--B'
Then the log says we merged 'Y'. We faithfully replay that,
which wuold result in "fast-forward -- nothing special is
needed" situation. The remaining log entries would say we have
two further commits, so replaying them would result in:
A---B---C---D---E topic
/ /
---X---o---Y---Z master
\
A'--B'--C'--D' topic'
next prev parent reply other threads:[~2006-11-27 8:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-27 0:15 Idea for rebase strategy Johannes Schindelin
2006-11-27 8:33 ` Junio C Hamano [this message]
2006-11-27 9:02 ` Andy Whitcroft
2006-11-27 9:26 ` Junio C Hamano
2006-11-27 23:40 ` Johannes Schindelin
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=7vfyc5l24t.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.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