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

Re: [PATCH 2/2] fetch-pack: in protocol v2, reset in_vain upon ACK

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 26, 2020, 01:10 UTC
Message-ID
<20200426011044.GF877@gmail.com>
In-Reply-To
<8499d5268e49b6b823b0b9312d77e41e311d9a75.1587775989.git.jonathantanmy@google.com>
Jonathan Tan wrote:
Show 34 quoted lines
> --- a/t/t5500-fetch-pack.sh
> +++ b/t/t5500-fetch-pack.sh
> @@ -404,6 +404,36 @@ test_expect_success 'in_vain not triggered before first ACK' '
>  	test_i18ngrep "Total 3 " trace
>  '
>  
> +test_expect_success 'in_vain resetted upon ACK' '
> +	rm -rf myserver myclient trace &&
> +	git init myserver &&
> +
> +	# Linked list of commits on master. The first is common; the rest are
> +	# not.
> +	test_commit -C myserver first_master_commit &&
> +	git clone "file://$(pwd)/myserver" myclient &&
> +	test_commit_bulk -C myclient 255 &&
> +
> +	# Another linked list of commits on anotherbranch with no connection to
> +	# master. The first is common; the rest are not.
> +	git -C myserver checkout --orphan anotherbranch &&
> +	test_commit -C myserver first_anotherbranch_commit &&
> +	git -C myclient fetch origin anotherbranch:refs/heads/anotherbranch &&
> +	git -C myclient checkout anotherbranch &&
> +	test_commit_bulk -C myclient 255 &&
> +
> +	# The new commit that the client wants to fetch.
> +	git -C myserver checkout master &&
> +	test_commit -C myserver to_fetch &&
> +
> +	# The client will send (as "have"s) all 256 commits in anotherbranch
> +	# first. The 256th commit is common between the client and the server,
> +	# and should reset in_vain. This allows negotiation to continue until
> +	# the client reports that first_anotherbranch_commit is common.
> +	GIT_TRACE_PACKET="$(pwd)/trace" git -C myclient fetch --progress origin master &&
> +	test_i18ngrep "Total 3 " trace
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks.

As with the other patch, trace2 output from the server might be more stable.

Do these tests pass with protocol v0 as well? (Forgive my laziness in not checking yet.)

Previous: Jonathan TanNext: Jonathan Tan
Message 8 of 25 in “Protocol v2 in_vain fixes”
  1. 0/2 Protocol v2 in_vain fixesJonathan Tan, Apr 25, 2020
  2. 1/2 fetch-pack: in protocol v2, in_vain only after ACKJonathan Tan, Apr 25, 2020
  3. Junio C HamanoApr 25, 2020
  4. Jonathan NiederApr 26, 2020
  5. Jonathan TanApr 27, 2020
  6. Junio C HamanoApr 27, 2020
  7. 2/2 fetch-pack: in protocol v2, reset in_vain upon ACKJonathan Tan, Apr 25, 2020
  8. Jonathan NiederApr 26, 2020
  9. Jonathan TanApr 27, 2020
  10. 0/3 Protocol v2 in_vain fixesJonathan Tan, Apr 28, 2020
  11. 1/3 fetch-pack: return enum from process_acks()Jonathan Tan, Apr 28, 2020
  12. Jonathan NiederApr 28, 2020
  13. Junio C HamanoApr 28, 2020
  14. Michal SuchánekApr 28, 2020
  15. Junio C HamanoApr 28, 2020
  16. 2/3 fetch-pack: in protocol v2, in_vain only after ACKJonathan Tan, Apr 28, 2020
  17. Jonathan NiederApr 28, 2020
  18. Johannes SchindelinMay 6, 2020
  19. t5500: count objects through stderr, not traceJonathan Tan, May 6, 2020
  20. Junio C HamanoMay 6, 2020
  21. Junio C HamanoMay 6, 2020
  22. Johannes SchindelinMay 7, 2020
  23. Johannes SchindelinOct 13, 2020
  24. 3/3 fetch-pack: in protocol v2, reset in_vain upon ACKJonathan Tan, Apr 28, 2020
  25. Jonathan NiederApr 28, 2020

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.