git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 08/13] test-reach: test reduce_heads()

From
Stefan Beller <sbeller@google.com>
Date
Jun 29, 2018, 22:06 UTC
Message-ID
<CAGZ79kafYmpzYws7WQJO4-zmWwTBo9Pwo-PpkbmJF+Z9GzsvZA@mail.gmail.com>
In-Reply-To
<20180629161223.229661-9-dstolee@microsoft.com>
On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee <dstolee@microsoft.com> wrote:
Show 31 quoted lines
>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  t/t6600-test-reach.sh | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/t/t6600-test-reach.sh b/t/t6600-test-reach.sh
> index c9337b6b46..0f60db9c60 100755
> --- a/t/t6600-test-reach.sh
> +++ b/t/t6600-test-reach.sh
> @@ -78,4 +78,30 @@ test_expect_success 'ref_newer:miss' '
>         test_reach_two_modes "ref_newer"
>  '
>
> +test_expect_success 'reduce_heads' '
> +       cat >input <<- EOF &&
> +       X:commit-1-10
> +       X:commit-2-8
> +       X:commit-3-6
> +       X:commit-4-4
> +       X:commit-1-7
> +       X:commit-2-5
> +       X:commit-3-3
> +       X:commit-5-1
> +       Y:commit-10-10
> +       Y:commit-3-10
> +       Y:commit-9-9
> +       Y:commit-8-1
> +       EOF
> +       printf "reduce_heads(X):\n" >expect &&
> +       git rev-parse commit-5-1 >>expect &&

See 6ac767e5c00 (t6036, t6042: prefer test_cmp to sequences of test, 2018-05-24) on how to avoid some forks here:

    git rev-parse >expect \
        many HEADs or Tips &&
Previous: Derrick StoleeNext: Derrick Stolee
Message 21 of 29 in “Consolidate reachability logic”
  1. 00/13 Consolidate reachability logicDerrick Stolee, Jun 29, 2018
  2. 01/13 commit-reach: move walk methods from commit.cDerrick Stolee, Jun 29, 2018
  3. Stefan BellerJun 29, 2018
  4. Junio C HamanoJun 29, 2018
  5. 02/13 commit-reach: move ref_newer from remote.cDerrick Stolee, Jun 29, 2018
  6. 03/13 commit-reach: move commit_contains from ref-filterDerrick Stolee, Jun 29, 2018
  7. Stefan BellerJun 29, 2018
  8. Derrick StoleeJun 30, 2018
  9. Junio C HamanoJun 29, 2018
  10. 04/13 upload-pack: make reachable() more genericDerrick Stolee, Jun 29, 2018
  11. Junio C HamanoJun 29, 2018
  12. 06/13 commit-reach: move can_all_from_reach_with_flag()Derrick Stolee, Jun 29, 2018
  13. Stefan BellerJun 29, 2018
  14. Derrick StoleeJun 30, 2018
  15. 10/13 commit-reach: test is_descendant_ofDerrick Stolee, Jun 29, 2018
  16. 09/13 commit-reach: test can_all_from_reachDerrick Stolee, Jun 29, 2018
  17. 12/13 commit-reach: use is_descendant_of for ref_newerDerrick Stolee, Jun 29, 2018
  18. 13/13 commit-reach: use can_all_from_reachDerrick Stolee, Jun 29, 2018
  19. Stefan BellerJun 29, 2018
  20. 08/13 test-reach: test reduce_heads()Derrick Stolee, Jun 29, 2018
  21. Stefan BellerJun 29, 2018
  22. 11/13 commit-reach: make can_all_from_reach... linearDerrick Stolee, Jun 29, 2018
  23. Stefan BellerJun 29, 2018
  24. 05/13 upload-pack: refactor ok_to_give_up()Derrick Stolee, Jun 29, 2018
  25. Stefan BellerJun 29, 2018
  26. 07/13 test-reachDerrick Stolee, Jun 29, 2018
  27. Stefan BellerJun 29, 2018
  28. Derrick StoleeJun 30, 2018
  29. Derrick StoleeJun 29, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.