git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Remove is_bare_repository_cfg global state
@ 2024-11-06 20:47 John Cai via GitGitGadget
  2024-11-06 20:48 ` [PATCH 1/3] git: remove is_bare_repository_cfg global variable John Cai via GitGitGadget
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: John Cai via GitGitGadget @ 2024-11-06 20:47 UTC (permalink / raw)
  To: git; +Cc: John Cai

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-12-11 23:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-06 20:47 [PATCH 0/3] Remove is_bare_repository_cfg global state John Cai via GitGitGadget
2024-11-06 20:48 ` [PATCH 1/3] git: remove is_bare_repository_cfg global variable John Cai via GitGitGadget
2024-11-07  5:46   ` Junio C Hamano
2024-11-07 16:04     ` shejialuo
2024-11-08  1:24       ` Junio C Hamano
2024-11-16 12:09         ` shejialuo
2024-11-06 20:48 ` [PATCH 2/3] setup: initialize is_bare_cfg John Cai via GitGitGadget
2024-11-07  6:25   ` Junio C Hamano
2024-11-06 20:48 ` [PATCH 3/3] repository: BUG when is_bare_cfg is not initialized John Cai via GitGitGadget
2024-11-26  8:08 ` [PATCH 0/3] Remove is_bare_repository_cfg global state Junio C Hamano
2024-12-11 23:09 ` (RFH Windows breakage) " Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).