git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 16:54 UTC

Re: [PATCH v2 0/7] setup: enforce repo passed to `create_repository()` has no state

From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Date
Sep 28, 2026, 12:19 UTC
Message-ID
<886d145f-ac38-4079-8a96-f09904fc3b10@gmail.com>
In-Reply-To
<b0ec2ef9-7aef-4f7d-b31b-7141b39c2d24@gmail.com>
On 9/28/26 17:45, Kaartic Sivaraam wrote:
Show 26 quoted lines
> On 9/28/26 15:21, Patrick Steinhardt wrote:
>>
>> [... snip ...]
>  >
>> 3:  3a7c197f1b = 3:  8dd89f144a builtin/init: refactor messy creation 
>> of leading directories
>> 4:  c3ced666bd = 4:  f37db1b17d builtin/init: move handling of 
>> "core.sharedRepository" into "setup.c"
>> 5:  25918a4ff6 = 5:  db76d32f2c builtin/clone: don't apply 
>> "core.sharedRepository" to leading dirs
>> 6:  a742852675 ! 6:  19388a188c repository: adapt `repo_clear()` to 
>> fully reset the repository
>>      @@ Commit message
>>           some state because we don't make sure to clear the whole 
>> structure.
>>           Refactor the function to set the whole repository to all- 
>> zeroes to avoid
>>      -    any kind of leaking state. While at it, make it a bit more 
>> robust when
>>      -    called on an already-blank repository.
>>      +    any kind of leaking state. Replace calls of 
>> `FREE_AND_NULL()` to instead
>>      +    use free(3p) to avoid zeroing out the data twice.
>>
> 
> s/free(3p)/free/
Oops. I meant s/free(3p)/free(3)/
 >
> Rest of the inter-diff looks neat.
> 
-- 
Sivaraam
Previous: Kaartic SivaraamNext: Patrick Steinhardt
Message 29 of 32 in “setup: enforce repo passed to `create_repository()` has no state”
  1. 0/7 setup: enforce repo passed to `create_repository()` has no statePatrick Steinhardt, Sep 24, 2026
  2. 1/7 path: drop useless `safe_create_leading_directories_1()`Patrick Steinhardt, Sep 24, 2026
  3. 2/7 path: introduce `safe_create_leading_directories_no_share_const()`Patrick Steinhardt, Sep 24, 2026
  4. 3/7 builtin/init: refactor messy creation of leading directoriesPatrick Steinhardt, Sep 24, 2026
  5. 4/7 builtin/init: move handling of "core.sharedRepository" into "setup.c"Patrick Steinhardt, Sep 24, 2026
  6. 5/7 builtin/clone: don't apply "core.sharedRepository" to leading dirsPatrick Steinhardt, Sep 24, 2026
  7. 6/7 repository: adapt `repo_clear()` to fully reset the repositoryPatrick Steinhardt, Sep 24, 2026
  8. 7/7 setup: enforce that passed-in repo does not carry relevant statePatrick Steinhardt, Sep 24, 2026
  9. Kaartic SivaraamSep 25, 2026
  10. Kaartic SivaraamSep 25, 2026
  11. Kaartic SivaraamSep 25, 2026
  12. Kaartic SivaraamSep 25, 2026
  13. Patrick SteinhardtSep 28, 2026
  14. Karthik NayakSep 28, 2026
  15. Karthik NayakSep 28, 2026
  16. Karthik NayakSep 28, 2026
  17. Karthik NayakSep 28, 2026
  18. Kaartic SivaraamSep 28, 2026
  19. 0/7 setup: enforce repo passed to `create_repository()` has no statePatrick Steinhardt, Sep 28, 2026
  20. 1/7 path: drop useless `safe_create_leading_directories_1()`Patrick Steinhardt, Sep 28, 2026
  21. 2/7 path: introduce `safe_create_leading_directories_no_share_const()`Patrick Steinhardt, Sep 28, 2026
  22. 3/7 builtin/init: refactor messy creation of leading directoriesPatrick Steinhardt, Sep 28, 2026
  23. 4/7 builtin/init: move handling of "core.sharedRepository" into "setup.c"Patrick Steinhardt, Sep 28, 2026
  24. 5/7 builtin/clone: don't apply "core.sharedRepository" to leading dirsPatrick Steinhardt, Sep 28, 2026
  25. 6/7 repository: adapt `repo_clear()` to fully reset the repositoryPatrick Steinhardt, Sep 28, 2026
  26. 7/7 setup: enforce that passed-in repo does not carry relevant statePatrick Steinhardt, Sep 28, 2026
  27. Patrick SteinhardtSep 28, 2026
  28. Kaartic SivaraamSep 28, 2026
  29. Kaartic SivaraamSep 28, 2026
  30. Patrick SteinhardtSep 28, 2026
  31. Patrick SteinhardtSep 28, 2026
  32. Junio C HamanoSep 28, 2026

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.