Re: [PATCH v3 07/13] graph: example of graph output that can be simplified
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Oct 17, 2019, 12:30 UTC
- Message-ID
- <3dfddde2-05e9-01ca-2ce8-d504f49b72bc@gmail.com>
- In-Reply-To
- <631ee3cecb68d9f776d4a8fb30c1bca70797ba14.1571183279.git.gitgitgadget@gmail.com>
On 10/15/2019 7:47 PM, James Coglan via GitGitGadget wrote:
Show 33 quoted lines
> diff --git a/t/t4215-log-skewed-merges.sh b/t/t4215-log-skewed-merges.sh > new file mode 100755 > index 0000000000..4582ba066a > --- /dev/null > +++ b/t/t4215-log-skewed-merges.sh > @@ -0,0 +1,43 @@ > +#!/bin/sh > + > +test_description='git log --graph of skewed merges' > + > +. ./test-lib.sh > + > +test_expect_success 'log --graph with merge fusing with its left and right neighbors' ' > + cat >expect <<-\EOF && > + * H > + |\ > + | * G > + | |\ > + | | * F > + | | | > + | | \ > + | *-. \ E > + | |\ \ \ > + |/ / / / > + | | | / > + | | |/ > + | | * D > + | * | C > + | |/ > + * | B > + |/ > + * A > + EOF
Thanks for adding this test! I really think it helps show some of your improvements later as this test is mutated.
-Stolee
Show 17 quoted lines
> + > + git checkout --orphan _p && > + test_commit A && > + test_commit B && > + git checkout -b _q @^ && test_commit C && > + git checkout -b _r @^ && test_commit D && > + git checkout _p && git merge --no-ff _q _r -m E && > + git checkout _r && test_commit F && > + git checkout _p && git merge --no-ff _r -m G && > + git checkout @^^ && git merge --no-ff _p -m H && > + > + git log --graph --pretty=tformat:%s | sed "s/ *$//" >actual && > + test_cmp expect actual > +' > + > +test_done >