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

Re: [PATCH] upload-pack: add tracing for fetches

From
Taylor Blau <me@ttaylorr.com>
Date
Oct 11, 2023, 21:26 UTC
Message-ID
<ZScTGyI/XVveu4M7@nand.local>
In-Reply-To
<pull.1598.git.1697040242703.gitgitgadget@gmail.com>
On Wed, Oct 11, 2023 at 04:04:02PM +0000, Robert Coup via GitGitGadget wrote:
Show 15 quoted lines
> diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
> index d18f2823d86..bb15ac34f77 100755
> --- a/t/t5500-fetch-pack.sh
> +++ b/t/t5500-fetch-pack.sh
> @@ -132,13 +132,18 @@ test_expect_success 'single branch object count' '
>  '
>
>  test_expect_success 'single given branch clone' '
> -	git clone --single-branch --branch A "file://$(pwd)/." branch-a &&
> -	test_must_fail git --git-dir=branch-a/.git rev-parse origin/B
> +	GIT_TRACE2_EVENT="$(pwd)/branch-a/trace2_event" \
> +		git clone --single-branch --branch A "file://$(pwd)/." branch-a &&
> +	test_must_fail git --git-dir=branch-a/.git rev-parse origin/B &&
> +	grep \"fetch-info\".*\"haves\":0 branch-a/trace2_event &&
> +	grep \"fetch-info\".*\"wants\":1 branch-a/trace2_event

Not at all related to your patch here, but I feel like we have a bunch of these greps sprinkled throughout the test suite which serve to inspect some key(s) of a JSON object printed to the trace2 event stream.

It might be nice to have a more robust test-tool that could do this heavy lifting for us instead of having to write these grep expressions ourselves.

But definitely outside the scope of this patch ;-).

Thanks, Taylor

Previous: Robert Coup via GitGitGadgetNext: Taylor Blau
Message 2 of 10 in “upload-pack: add tracing for fetches”
  1. upload-pack: add tracing for fetchesRobert Coup via GitGitGadget, Oct 11, 2023
  2. Taylor BlauOct 11, 2023
  3. Taylor BlauOct 11, 2023
  4. Robert CoupOct 11, 2023
  5. Jeff KingOct 11, 2023
  6. Robert CoupOct 11, 2023
  7. upload-pack: add tracing for fetchesRobert Coup via GitGitGadget, Oct 17, 2023
  8. Robert CoupOct 23, 2023
  9. Jeff KingOct 23, 2023
  10. Taylor BlauOct 30, 2023

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.