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

Re: [RFC PATCH 1/2] t5412: test receive-pack connectivity check

From
Justin Tobler <jltobler@gmail.com>
Date
May 19, 2025, 21:08 UTC
Message-ID
<g2sthtaz5u4zj56bc7clqpxkgcn6leqbbim3kvsvqsaxe2io5o@kmzit5vi7trh>
In-Reply-To
<aBtgCYYKPuowEeNQ@pks.im>
On 25/05/07 03:28PM, Patrick Steinhardt wrote:
Show 10 quoted lines
> On Tue, May 06, 2025 at 10:02:48PM -0500, Justin Tobler wrote:
> > @@ -630,6 +630,7 @@ integration_tests = [
> >    't5409-colorize-remote-messages.sh',
> >    't5410-receive-pack-alternates.sh',
> >    't5411-proc-receive-hook.sh',
> > +  't5412-receive-pack.sh',
> 
> Instead of creating a new test file, do we maybe want to generalize
> "t5410-receive-pack-alternates.sh"? Just a suggestion, this is not a
> strong requirement from my side.
That makes sense to me. I'll generalize "t5410" and add the test there.
Show 5 quoted lines
> > +	# Capture git-send-pack(1) output sent to git-receive-pack(1).
> > +	git -C repo send-pack ../setup.git --all \
> 
> The `-C repo` shouldn't be necessary at all, should it? The repository
> in which it runs is specified via the first parameter.

The repository specified by the first parameter is the repository the pack is being sent to. We still need to define the repository on the sending side.

Show 6 quoted lines
> > +	test_grep "fatal: Failed to traverse parents" actual &&
> > +	test_must_fail git -C remote.git cat-file -e $(git -C repo rev-parse HEAD)
> 
> I'm a bit surprised by the error message though. First, why is it on
> stdout? Second, shouldn't there be some hint that the connectivity check
> has failed in the error message?

From my understanding, git-receive-pack(1) also writes the errors it encounters on stdout using sideband. On stderr, git-receive-pack(1) does print the git-rev-list(1) errors it encounters also so we could just capture that and use it in the assertions instead.

When the connectivity check fails, the command error string is set to "missing necessary objects" and outputted on stdout. I will also add a check for this too.

-Justin
Previous: Patrick SteinhardtNext: Justin Tobler
Message 4 of 25 in “builtin/receive-pack: introduce option to skip connectivity checks”
  1. 0/2 builtin/receive-pack: introduce option to skip connectivity checksJustin Tobler, May 7, 2025
  2. 1/2 t5412: test receive-pack connectivity checkJustin Tobler, May 7, 2025
  3. Patrick SteinhardtMay 7, 2025
  4. Justin ToblerMay 19, 2025
  5. 2/2 builtin/receive-pack: add option to skip connectivity checkJustin Tobler, May 7, 2025
  6. Patrick SteinhardtMay 7, 2025
  7. Junio C HamanoMay 7, 2025
  8. 0/2 builtin/receive-pack: introduce option to skip connectivity checksJustin Tobler, May 20, 2025
  9. 1/2 t5410: test receive-pack connectivity checkJustin Tobler, May 20, 2025
  10. Karthik NayakMay 20, 2025
  11. 2/2 builtin/receive-pack: add option to skip connectivity checkJustin Tobler, May 20, 2025
  12. Patrick SteinhardtMay 20, 2025
  13. Justin ToblerMay 20, 2025
  14. Karthik NayakMay 20, 2025
  15. 0/2 builtin/receive-pack: introduce option to skip connectivity checksJustin Tobler, May 20, 2025
  16. 1/2 t5410: test receive-pack connectivity checkJustin Tobler, May 20, 2025
  17. 2/2 builtin/receive-pack: add option to skip connectivity checkJustin Tobler, May 20, 2025
  18. Johannes SchindelinJun 2, 2025
  19. Justin ToblerJun 2, 2025
  20. Johannes SchindelinJun 2, 2025
  21. Junio C HamanoJun 2, 2025
  22. Patrick SteinhardtJun 3, 2025
  23. Johannes SchindelinJun 5, 2025
  24. Patrick SteinhardtJun 5, 2025
  25. Karthik NayakMay 22, 2025

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.