From: Junio C Hamano <gitster@pobox.com>
To: Stephen Haberman <stephen@exigencecorp.com>
Cc: git@vger.kernel.org, spearce@spearce.org
Subject: Re: [PATCH v2 RFC] rebase-i-p: test to exclude commits from todo based on its parents
Date: Wed, 08 Oct 2008 00:24:32 -0700 [thread overview]
Message-ID: <7vmyhfr1lb.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <e5ababa1de420b6460fd856679990c9dd2caf1d1.1223445353.git.stephen@exigencecorp.com> (Stephen Haberman's message of "Wed, 8 Oct 2008 01:41:51 -0500")
Stephen Haberman <stephen@exigencecorp.com> writes:
> +# set up two branches like this:
> +#
> +# A1 - B1 - D1 - E1 - F1
> +# \ /
> +# -- C1 --
> ...
> +test_expect_success 'setup' '
> ...
> +'
> +
> +# Should result in:
> +#
> +# A1 - B1 - D2 - E2
> +# \ /
> +# -- C1 --
> +#
> +test_expect_success 'squash F1 into D1' '
> + FAKE_LINES="1 squash 3 2" git rebase -i -p B1 &&
> + test "$(git rev-parse HEAD^2)" = "$(git rev-parse branch)" &&
> + test "$(git rev-parse HEAD~2)" = "$(git rev-parse B1)" &&
> + git tag E2
> +'
Very nicely written test sequence with pictures. I wish all the tests
were written like this.
> +# Start with:
> +#
> +# A1 - B1 - D2 - E2
> +# \
> +# G1 ---- L1 ---- M1
> +# \ /
> +# H1 -- J1 -- K1
> +# \ /
> +# -- I1 --
> +#
> +# And rebase G1..M1 onto E3
I think s/E3/E2/ is what you meant.
If this is the first one in the series, you may want to mark these tests
with test_expect_failure and make a later patch that changes the behaviour
of rebase-i-p include updates to the test script to turn expect-failure
into expect-success.
next prev parent reply other threads:[~2008-10-08 7:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-08 6:41 [PATCH v2 RFC] rebase-i-p: squashing and limiting todo Stephen Haberman
2008-10-08 6:41 ` [PATCH v2 RFC] rebase-i-p: test to exclude commits from todo based on its parents Stephen Haberman
2008-10-08 6:41 ` [PATCH v2 RFC] rebase-i-p: use HEAD for updating the ref instead of mapping OLDHEAD Stephen Haberman
2008-10-08 6:41 ` [PATCH v2 RFC] rebase-i-p: delay saving current-commit to REWRITTEN if squashing Stephen Haberman
2008-10-08 6:41 ` [PATCH v2 RFC] rebase-i-p: fix 'no squashing merges' tripping up non-merges Stephen Haberman
2008-10-08 6:41 ` [PATCH v2 RFC] rebase-i-p: only list commits that require rewriting in todo Stephen Haberman
2008-10-08 6:41 ` [PATCH v2 RFC] rebase-i-p: do not include non-first-parent commits touching UPSTREAM Stephen Haberman
2008-10-08 6:41 ` [PATCH v2 RFC] rebase-i-p: if todo was reordered use HEAD as the rewritten parent Stephen Haberman
2008-10-08 7:24 ` Junio C Hamano [this message]
2008-10-09 1:58 ` [PATCH v2 RFC] rebase-i-p: test to exclude commits from todo based on its parents Stephen Haberman
2008-10-08 7:15 ` [PATCH v2 RFC] rebase-i-p: squashing and limiting todo Stephen Haberman
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=7vmyhfr1lb.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
--cc=stephen@exigencecorp.com \
/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).