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

[PATCH 0/3] Remove is_bare_repository_cfg global state

From
John Cai via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 6, 2024, 20:47 UTC
Message-ID
<pull.1826.git.git.1730926082.gitgitgadget@gmail.com>

This patch series removes the global state introduced by the is_bare_repository_cfg variable by moving it into the repository struct. Most of the refactor is done by patch 1. Patch 2 initializes the member in places that left it unInitialized, while patch 3 adds a safety measure by BUG()ing when the variable has not been properly initialized.

John Cai (3):
  git: remove is_bare_repository_cfg global variable
  setup: initialize is_bare_cfg
  repository: BUG when is_bare_cfg is not initialized
 attr.c                        |  4 ++--
 builtin/bisect.c              |  2 +-
 builtin/blame.c               |  2 +-
 builtin/check-attr.c          |  2 +-
 builtin/clone.c               |  4 ++--
 builtin/gc.c                  |  2 +-
 builtin/init-db.c             | 14 +++++++-------
 builtin/repack.c              |  2 +-
 builtin/reset.c               |  2 +-
 builtin/rev-parse.c           |  2 +-
 builtin/submodule--helper.c   |  2 +-
 config.c                      |  2 +-
 dir.c                         |  2 +-
 environment.c                 |  7 -------
 environment.h                 |  3 +--
 git.c                         |  2 +-
 mailmap.c                     |  4 ++--
 refs/files-backend.c          |  2 +-
 refs/reftable-backend.c       |  2 +-
 repository.c                  | 23 +++++++++++++++++++----
 repository.h                  | 12 +++++++++++-
 scalar.c                      |  2 +-
 setup.c                       | 19 +++++++++++++------
 submodule.c                   |  2 +-
 t/helper/test-partial-clone.c |  2 +-
 t/helper/test-repository.c    |  4 ++--
 transport.c                   |  4 ++--
 worktree.c                    |  4 ++--
 28 files changed, 79 insertions(+), 55 deletions(-)
base-commit: 8f8d6eee531b3fa1a8ef14f169b0cb5035f7a772
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1826%2Fjohn-cai%2Fjc%2Fremove_is_bare_global-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1826/john-cai/jc/remove_is_bare_global-v1
Pull-Request: https://github.com/git/git/pull/1826
-- 
gitgitgadget
Next: John Cai via GitGitGadget
Message 1 of 11 in “Remove is_bare_repository_cfg global state”
  1. 0/3 Remove is_bare_repository_cfg global stateJohn Cai via GitGitGadget, Nov 6, 2024
  2. 1/3 git: remove is_bare_repository_cfg global variableJohn Cai via GitGitGadget, Nov 6, 2024
  3. Junio C HamanoNov 7, 2024
  4. shejialuoNov 7, 2024
  5. Junio C HamanoNov 8, 2024
  6. shejialuoNov 16, 2024
  7. 2/3 setup: initialize is_bare_cfgJohn Cai via GitGitGadget, Nov 6, 2024
  8. Junio C HamanoNov 7, 2024
  9. 3/3 repository: BUG when is_bare_cfg is not initializedJohn Cai via GitGitGadget, Nov 6, 2024
  10. Junio C HamanoNov 26, 2024
  11. (RFH Windows breakage) Re: [PATCH 0/3] Remove is_bare_repository_cfg global stateJunio C Hamano, Dec 11, 2024

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.