Re: [GSoC Patch 3/5] t4215: use lib-log-graph functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Abhishek Kumar <abhishekkumar8222@xxxxxxxxx> writes:

> Helped-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
> Signed-off-by: Abhishek Kumar <abhishekkumar8222@xxxxxxxxx>
> ---
>  t/t4215-log-skewed-merges.sh | 26 ++++++++++----------------
>  1 file changed, 10 insertions(+), 16 deletions(-)
>
> diff --git a/t/t4215-log-skewed-merges.sh b/t/t4215-log-skewed-merges.sh
> index 1d0d3240ff..bca478cb83 100755
> --- a/t/t4215-log-skewed-merges.sh
> +++ b/t/t4215-log-skewed-merges.sh
> @@ -3,13 +3,7 @@
>  test_description='git log --graph of skewed merges'
>  
>  . ./test-lib.sh
> -
> -check_graph () {
> -	cat >expect &&
> -	git log --graph --pretty=tformat:%s "$@" >actual.raw &&
> -	sed "s/ *$//" actual.raw >actual &&
> -	test_cmp expect actual
> -}
> +. "$TEST_DIRECTORY"/lib-log-graph.sh
>  
>  test_expect_success 'log --graph with merge fusing with its left and right neighbors' '
>  	git checkout --orphan _p &&
> @@ -22,7 +16,7 @@ test_expect_success 'log --graph with merge fusing with its left and right neigh
>  	git checkout _p && git merge --no-ff _r -m G &&
>  	git checkout @^^ && git merge --no-ff _p -m H &&
>  
> -	check_graph <<-\EOF
> +	test_cmp_graph --pretty=tformat:%s <<-\EOF

Almost exactly the same comment as [2/5] applies here, but luckily
the name of the local helper used here is check_graph, so we can
discard all the hunks after -22,7 above and instead use

	check_graph () {
		test_cmp_graph --format:%s "$@"
	}

to reduce the code churn, I would think.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux