Re: [PATCH v2 5/7] add tests for rebasing merged history
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- May 29, 2013, 07:57 UTC
- Message-ID
- <51A5B4E1.3070205@viscovery.net>
- In-Reply-To
- <1369809572-24431-6-git-send-email-martinvonz@gmail.com>
Am 5/29/2013 8:39, schrieb Martin von Zweigbergk:
Show 7 quoted lines
> +# a---b-----------c > +# \ \ > +# d-------e \ > +# \ \ \ > +# n---o---w---v > +# \ > +# z
> +#TODO: make all flavors of rebase use --topo-order > +test_run_rebase success 'e n o' '' > +test_run_rebase success 'e n o' -m > +test_run_rebase success 'n o e' -i
As test_commit offers predictable timestamps, I think you can work around this discrepancy by generating commits n and o before e. (That is not a solution--just a workaround that depends on the current implementation--because the order in which parents of a merge are listed is unspecified.)
> +test_expect_success "rebase -p re-creates internal merge" " > + reset_rebase && > + git rebase -p c w && > + test_revision_subjects 'c d n e o w' HEAD~4 HEAD~3 HEAD~2 HEAD^2 HEAD^ HEAD
Shouldn't this better be
test_cmp_rev c HEAD~4 && test_revision_subjects 'd n e o w' HEAD~3 HEAD~2 HEAD^2 HEAD^ HEAD
to ensure that c is not a rewritten commit?
Show 7 quoted lines
> +" > + > +test_expect_success "rebase -p can re-create two branches on onto" " > + reset_rebase && > + git rebase -p --onto c d w && > + test_revision_subjects 'c n e o w' HEAD~3 HEAD~2 HEAD^2 HEAD^ HEAD > +"
Same here.
Time is fleeting. I have to stop here.
-- Hannes