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

Re: [PATCH 4/5] refs/reftable-backend: drop uses of the_repository

From
Patrick Steinhardt <ps@pks.im>
Date
Mar 27, 2026, 07:50 UTC
Message-ID
<acY2suRJ4OlNHYu7@pks.im>
In-Reply-To
<20260325164833.1216577-5-shreyanshpaliwalcmsmn@gmail.com>
On Wed, Mar 25, 2026 at 10:14:21PM +0530, Shreyansh Paliwal wrote:
Show 9 quoted lines
> reftable_be_init() and reftable_be_create_on_disk() use the_repository even
> though a repository instance is already available, either directly or via
> struct ref_store.
> 
> Replace these uses with the appropriate local repository instance (repo or
> ref_store->repo) to avoid relying on global state.
> 
> Note that USE_THE_REPOSITORY_VARIABLE cannot be removed yet, as
> is_bare_repository() is still there in the file.
Yeah, `is_bare_repository()` is a blocker in many files :(
Patrick
Previous: Shreyansh PaliwalNext: Shreyansh Paliwal
Message 11 of 48 in “refs: reduce reliance on the_repository global state”
  1. 0/5 refs: reduce reliance on the_repository global stateShreyansh Paliwal, Mar 25, 2026
  2. 1/5 refs: make branchname helpers repository awareShreyansh Paliwal, Mar 25, 2026
  3. Patrick SteinhardtMar 27, 2026
  4. Shreyansh PaliwalMar 28, 2026
  5. 2/5 refs: make get_files_ref_lock_timeout_ms() repostory awareShreyansh Paliwal, Mar 25, 2026
  6. Patrick SteinhardtMar 27, 2026
  7. Burak Kaan KaraçayMar 27, 2026
  8. Shreyansh PaliwalMar 28, 2026
  9. 3/5 refs: remove the_hash_algo global stateShreyansh Paliwal, Mar 25, 2026
  10. 4/5 refs/reftable-backend: drop uses of the_repositoryShreyansh Paliwal, Mar 25, 2026
  11. Patrick SteinhardtMar 27, 2026
  12. 5/5 refs/packed-backend: use ref_store->repo instead of the_repositoryShreyansh Paliwal, Mar 25, 2026
  13. 0/5 refs: reduce reliance on the_repository global stateShreyansh Paliwal, Mar 28, 2026
  14. 1/5 refs: make branchname helpers repository awareShreyansh Paliwal, Mar 28, 2026
  15. Tian YuchenMar 28, 2026
  16. Shreyansh PaliwalMar 29, 2026
  17. Tian YuchenMar 29, 2026
  18. 2/5 refs: make get_files_ref_lock_timeout_ms() repostory awareShreyansh Paliwal, Mar 28, 2026
  19. 3/5 refs: remove the_hash_algo global stateShreyansh Paliwal, Mar 28, 2026
  20. Tian YuchenMar 28, 2026
  21. 4/5 refs/reftable-backend: drop uses of the_repositoryShreyansh Paliwal, Mar 28, 2026
  22. 5/5 refs/packed-backend: use ref_store->repo instead of the_repositoryShreyansh Paliwal, Mar 28, 2026
  23. Tian YuchenMar 28, 2026
  24. Shreyansh PaliwalMar 29, 2026
  25. 0/5 replace the_repository with local repository instancesShreyansh Paliwal, Mar 29, 2026
  26. 1/5 refs: add struct repository parameter to branchname helpersShreyansh Paliwal, Mar 29, 2026
  27. Patrick SteinhardtApr 2, 2026
  28. Burak Kaan KaraçayApr 2, 2026
  29. Tian YuchenApr 2, 2026
  30. Patrick SteinhardtApr 2, 2026
  31. Shreyansh PaliwalApr 3, 2026
  32. 2/5 refs: add struct repository parameter in get_files_ref_lock_timeout_ms()Shreyansh Paliwal, Mar 29, 2026
  33. 3/5 refs: remove the_hash_algo global stateShreyansh Paliwal, Mar 29, 2026
  34. 4/5 refs/reftable-backend: drop uses of the_repositoryShreyansh Paliwal, Mar 29, 2026
  35. Patrick SteinhardtApr 2, 2026
  36. Shreyansh PaliwalApr 3, 2026
  37. 5/5 refs/packed-backend: use ref_store->repo instead of the_repositoryShreyansh Paliwal, Mar 29, 2026
  38. 0/3 refs: reduce reliance on global stateShreyansh Paliwal, Apr 3, 2026
  39. 1/3 refs: add struct repository parameter in get_files_ref_lock_timeout_ms()Shreyansh Paliwal, Apr 3, 2026
  40. Tian YuchenApr 3, 2026
  41. 2/3 refs: remove the_hash_algo global stateShreyansh Paliwal, Apr 3, 2026
  42. 3/3 refs/reftable-backend: drop uses of the_repositoryShreyansh Paliwal, Apr 3, 2026
  43. 0/3 refs: reduce reliance on global stateShreyansh Paliwal, Apr 4, 2026
  44. 1/3 refs: add struct repository parameter in get_files_ref_lock_timeout_ms()Shreyansh Paliwal, Apr 4, 2026
  45. 2/3 refs: remove the_hash_algo global stateShreyansh Paliwal, Apr 4, 2026
  46. 3/3 refs/reftable-backend: drop uses of the_repositoryShreyansh Paliwal, Apr 4, 2026
  47. Patrick SteinhardtApr 8, 2026
  48. Junio C HamanoApr 8, 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.