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

Re: [PATCH 2/2] builtin/receive-pack: add option to skip connectivity check

From
Karthik Nayak <karthik.188@gmail.com>
Date
May 20, 2025, 09:16 UTC
Message-ID
<CAOLa=ZR3kVG+ob-pzH+eB+0W6+mFMSe3CBKotiCOOZzff0U9nw@mail.gmail.com>
In-Reply-To
<20250520014920.201736-3-jltobler@gmail.com>
Justin Tobler <jltobler@gmail.com> writes:
Show 11 quoted lines
> During git-receive-pack(1), connectivity of the object graph is
> validated to ensure that the received packfile does not leave the
> repository in a broken state. This is done via git-rev-list(1) and
> walking the objects which can be expensive for large repositories.
>
> Generally, this check is critical to avoid an incomplete received
> packfile from corrupting a repository. Server operators may have
> additional knowledge though around exactly how Git is being used on the
> server-side which can be used to facilitate more efficient connectivity
> computatation of incoming objects.
>
s/computatation/computation
Show 21 quoted lines
>
> For example, if it can be ensured that all objects in a repository are
> connected and do not depend on any missing objects, the connectivity of
> newly written objects can be checked by walking the object graph
> containing only the new objects from the updated tips and identifying
> the missing objects which represent the boundary between the new objects
> and the repository. These boundary objects can be checked in the
> canonical repository to ensure the new objects connect as expected and
> thus avoid walking the rest of the object graph.
>
> Git itself cannot make the guarantees required for such an optimization
> as it is possible for a repository to contain an unreachable object that
> references a missing object without the repository being considered
> corrupt.
>
> Introduce the --skip-connectivity-check option for git-receive-pack(1)
> which bypasses this connectivity check to give more control to the
> server-side. Note that without proper server-side validation of newly
> received objects handled outside of Git, usage of this option risks
> corrupting a repository.
>
I don't have any comments for the patch itself, looked good to me!
Previous: Justin ToblerNext: Justin Tobler
Message 14 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.