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

Re: [GSOC PATCH v6 0/3] environment: remove sparse-checkout related global variables

From
Ayush Chandekar <ayu.chandekar@gmail.com>
Date
Aug 27, 2025, 21:31 UTC
Message-ID
<CAE7as+ZpEwiNsDAozoZXqHRLOF3+hT++uo=mzZqEvTPovQN9uw@mail.gmail.com>
In-Reply-To
<47d09c43-6d27-40ff-8dbc-22cc4a5949ed@gmail.com>
On Tue, Aug 26, 2025 at 5:50 PM Derrick Stolee <stolee@gmail.com> wrote:
Show 7 quoted lines
>
> On 8/10/25 11:36 AM, Ayush Chandekar wrote:
> > Just an update, I'm still working on this patch series.
>
> Hi Ayush. Do you have an update on your progress? Perhaps there
> is something you're stuck on and could use some help?
>

Hi Derrick, thanks for checking in! I have made a few branches by trying out different ways: [1],[2] & [3] I am quite close to sending the patch series now.

Show 23 quoted lines
> A few weeks ago, I played around with the ideas around updating
> the location of these globals into the repository struct and
> made this critical observation:
>
>    It's "easy" to move the global into the_repository, but it
>    becomes harder (and changes behavior) if we start referring
>    to the data in each repository struct.
>
> It may be good to separate the two things into different steps:
>
>   1. Move the globals into the repository struct, but only set
>      or read from the_repository->sparse_checkout[_cone].
>
>   2. Replace the use of the_repository and instead refer to a
>      specific repo. This may change behavior of the feature in
>      the presence of submodules with different config than the
>      root repo (tests before and after will be necessary).
>      We'll also need to update the_repository during the very
>      early config parsing but then update other repos during
>      repo initialization.
>
> Does this make sense based on your progress in this space?
>

Yes, I was able to do the first step, the second step means that I have to pass the repo struct to quite a few functions.

> Thanks,
> -Stolee
>

Thanks! Ayush:)

[1]: https://github.com/ayu-ch/git/commits/sparse-checkout-6 (Stored the variables in the 'struct repository' as int, and made a function to read their values from the config)

[2]: https://github.com/ayu-ch/git/commits/sparse-checkout-7 (Christian suggested me that I can also store them as booleans so I tried it.)

[3]: https://github.com/ayu-ch/git/commits/sparse-checkout-8 (Similar to [1] but set their value as -1 when uninitialized. Tests seem to fail though when I make this change.)

Previous: Derrick StoleeNext: Junio C Hamano
Message 48 of 50 in “environment: move access to "core.sparsecheckout" into repo_settings”
  1. environment: move access to "core.sparsecheckout" into repo_settingsAyush Chandekar, Jun 3, 2025
  2. Patrick SteinhardtJun 3, 2025
  3. Ayush ChandekarJun 3, 2025
  4. Ben KnobleJun 4, 2025
  5. Patrick SteinhardtJun 4, 2025
  6. Ayush ChandekarJun 4, 2025
  7. environment: move access to "core.sparsecheckout" into repo_settingsAyush Chandekar, Jun 8, 2025
  8. Christian CouderJun 8, 2025
  9. environment: move access to "core.sparsecheckout" into repo_settingsAyush Chandekar, Jun 11, 2025
  10. Junio C HamanoJun 11, 2025
  11. Junio C HamanoJun 11, 2025
  12. Ayush ChandekarJun 13, 2025
  13. 0/3 environment: remove sparse-checkout related global variablesAyush Chandekar, Jun 17, 2025
  14. 1/3 environment: move access to "core.sparsecheckout" into repo_settingsAyush Chandekar, Jun 17, 2025
  15. Junio C HamanoJun 17, 2025
  16. 2/3 environment: move access to "core.sparsecheckoutcone" into repo_settingsAyush Chandekar, Jun 17, 2025
  17. Junio C HamanoJun 17, 2025
  18. 3/3 environment: remove the global variable 'sparse_expect_files_outside_of_patterns'Ayush Chandekar, Jun 17, 2025
  19. Junio C HamanoJun 17, 2025
  20. 0/3 environment: remove sparse-checkout related global variablesAyush Chandekar, Jun 30, 2025
  21. 1/3 environment: move access to "core.sparsecheckout" into repo_settingsAyush Chandekar, Jun 30, 2025
  22. 2/3 environment: move access to "core.sparsecheckoutcone" into repo_settingsAyush Chandekar, Jun 30, 2025
  23. 3/3 environment: remove the global variable 'sparse_expect_files_outside_of_patterns'Ayush Chandekar, Jun 30, 2025
  24. Phillip WoodJul 1, 2025
  25. Ayush ChandekarJul 1, 2025
  26. Phillip WoodJul 2, 2025
  27. Ayush ChandekarJul 11, 2025
  28. Junio C HamanoJul 2, 2025
  29. Ayush ChandekarJul 11, 2025
  30. Junio C HamanoJun 30, 2025
  31. Junio C HamanoJul 9, 2025
  32. Ayush ChandekarJul 9, 2025
  33. 0/3 environment: remove sparse-checkout related global variablesAyush Chandekar, Jul 19, 2025
  34. 1/3 environment: move access to "core.sparsecheckout" into repo_settingsAyush Chandekar, Jul 19, 2025
  35. 2/3 environment: move access to "core.sparsecheckoutcone" into repo_settingsAyush Chandekar, Jul 19, 2025
  36. 3/3 environment: remove the global variable 'sparse_expect_files_outside_of_patterns'Ayush Chandekar, Jul 19, 2025
  37. Junio C HamanoJul 23, 2025
  38. Derrick StoleeJul 24, 2025
  39. Junio C HamanoJul 24, 2025
  40. Ayush ChandekarJul 29, 2025
  41. Derrick StoleeJul 29, 2025
  42. Ayush ChandekarJul 29, 2025
  43. Phillip WoodJul 30, 2025
  44. Junio C HamanoJul 30, 2025
  45. Ayush ChandekarJul 26, 2025
  46. Ayush ChandekarAug 10, 2025
  47. Derrick StoleeAug 26, 2025
  48. Ayush ChandekarAug 27, 2025
  49. Junio C HamanoSep 5, 2025
  50. Junio C HamanoSep 5, 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.