git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/21] config: remove use of `the_repository`
@ 2025-07-17 10:49 Patrick Steinhardt
  2025-07-17 10:49 ` [PATCH 01/21] config: drop `git_config()` wrapper Patrick Steinhardt
                   ` (21 more replies)
  0 siblings, 22 replies; 48+ messages in thread
From: Patrick Steinhardt @ 2025-07-17 10:49 UTC (permalink / raw)
  To: git

Hi,

this patch series removes uses of `the_repository` in "config.c". It
does this via two things:

  - By removing all the wrapper functions `git_config_get()` et al that
    implicitly rely on `the_repository`.

  - By moving the Git-specific config parsing (that is, the non-business
    logic like parsing "core.sharedRepository") into "environment.c".

This series is inspired by my painful tries yesterday to start parsing
repo settings early in the Git process lifecycle. The changes should
make it easier to eventually achieve that.

The patch series is long, but almost all of the patches are trivial as
they simply replace code like `git_config_foo(...)` with its equivalent
`repo_config_foo(the_repository, ...)`.

The series is based on top of 90c0775e972 (The eleventh batch,
2025-07-16) with bc/use-sha256-by-default-in-3.0 at c79bb70a2e7 (Enable
SHA-256 by default in breaking changes mode, 2025-07-01) merged into it
to fix a conflict with "next". There are a couple of merge conflicts
with "seen", but they are trivial to solve.

Thanks!

Patrick

---
Patrick Steinhardt (21):
      config: drop `git_config()` wrapper
      config: drop `git_config_clear()` wrapper
      config: drop `git_config_get()` wrapper
      config: drop `git_config_get_value()` wrapper
      config: drop `git_config_get_value()` wrapper
      config: drop `git_config_get_string_multi()` wrapper
      config: drop `git_config_get_string()` wrapper
      config: drop `git_config_get_string()` wrapper
      config: drop `git_config_get_int()` wrapper
      config: drop `git_config_get_ulong()` wrapper
      config: drop `git_config_get_bool()` wrapper
      config: drop `git_config_set_in_file()` wrapper
      config: drop `git_config_set_gently()` wrapper
      config: drop `git_config_set()` wrapper
      config: drop `git_config_set_in_file_gently()` wrapper
      config: drop `git_config_set_multivar_in_file_gently()` wrapper
      config: drop `git_config_get_multivar_gently()` wrapper
      config: drop `git_config_set_multivar()` wrapper
      config: remove unused `the_repository` wrappers
      config: move Git config parsing into "environment.c"
      config: fix sign comparison warnings

 Documentation/user-manual.adoc                 |   2 +-
 apply.c                                        |   6 +-
 archive-tar.c                                  |   2 +-
 archive-zip.c                                  |   2 +-
 archive.c                                      |   4 +-
 branch.c                                       |  10 +-
 builtin/add.c                                  |   1 +
 builtin/am.c                                   |  10 +-
 builtin/blame.c                                |   2 +-
 builtin/branch.c                               |   8 +-
 builtin/cat-file.c                             |   2 +-
 builtin/check-attr.c                           |   2 +-
 builtin/check-ignore.c                         |   3 +-
 builtin/check-mailmap.c                        |   3 +-
 builtin/checkout--worker.c                     |   3 +-
 builtin/checkout-index.c                       |   1 +
 builtin/checkout.c                             |   4 +-
 builtin/clean.c                                |   3 +-
 builtin/clone.c                                |  26 +-
 builtin/column.c                               |   4 +-
 builtin/commit-graph.c                         |   5 +-
 builtin/commit-tree.c                          |   3 +-
 builtin/commit.c                               |   4 +-
 builtin/config.c                               |  60 +--
 builtin/count-objects.c                        |   3 +-
 builtin/credential-cache--daemon.c             |   2 +-
 builtin/credential-store.c                     |   2 +-
 builtin/credential.c                           |   3 +-
 builtin/describe.c                             |   2 +-
 builtin/diff-files.c                           |   2 +-
 builtin/diff-index.c                           |   2 +-
 builtin/diff-tree.c                            |   2 +-
 builtin/diff.c                                 |   2 +-
 builtin/fast-export.c                          |   3 +-
 builtin/fast-import.c                          |  12 +-
 builtin/fetch.c                                |  10 +-
 builtin/fmt-merge-msg.c                        |   2 +-
 builtin/for-each-ref.c                         |   1 +
 builtin/fsck.c                                 |   2 +-
 builtin/fsmonitor--daemon.c                    |   3 +-
 builtin/gc.c                                   |  70 ++--
 builtin/grep.c                                 |   5 +-
 builtin/hash-object.c                          |   3 +-
 builtin/help.c                                 |   5 +-
 builtin/hook.c                                 |   3 +-
 builtin/index-pack.c                           |   2 +-
 builtin/interpret-trailers.c                   |   3 +-
 builtin/log.c                                  |  24 +-
 builtin/ls-files.c                             |   1 +
 builtin/ls-tree.c                              |   3 +-
 builtin/merge-base.c                           |   3 +-
 builtin/merge-file.c                           |   2 +-
 builtin/merge-tree.c                           |   3 +-
 builtin/merge.c                                |   2 +-
 builtin/mktag.c                                |   2 +-
 builtin/multi-pack-index.c                     |   5 +-
 builtin/mv.c                                   |   2 +-
 builtin/name-rev.c                             |   2 +-
 builtin/notes.c                                |   4 +-
 builtin/pack-objects.c                         |   2 +-
 builtin/pack-refs.c                            |   1 +
 builtin/patch-id.c                             |   3 +-
 builtin/pull.c                                 |   9 +-
 builtin/push.c                                 |   2 +-
 builtin/range-diff.c                           |   2 +-
 builtin/read-tree.c                            |   3 +-
 builtin/rebase.c                               |   4 +-
 builtin/receive-pack.c                         |   2 +-
 builtin/reflog.c                               |   2 +-
 builtin/refs.c                                 |   2 +-
 builtin/remote.c                               |  56 +--
 builtin/repack.c                               |   2 +-
 builtin/replace.c                              |   3 +-
 builtin/rerere.c                               |   2 +-
 builtin/reset.c                                |   2 +-
 builtin/rev-list.c                             |   2 +-
 builtin/rev-parse.c                            |   4 +-
 builtin/rm.c                                   |   3 +-
 builtin/send-pack.c                            |   1 +
 builtin/shortlog.c                             |   2 +-
 builtin/show-branch.c                          |   2 +-
 builtin/show-ref.c                             |   3 +-
 builtin/sparse-checkout.c                      |   2 +-
 builtin/stash.c                                |   4 +-
 builtin/stripspace.c                           |   2 +-
 builtin/submodule--helper.c                    |  56 +--
 builtin/symbolic-ref.c                         |   3 +-
 builtin/tag.c                                  |   2 +-
 builtin/unpack-file.c                          |   3 +-
 builtin/unpack-objects.c                       |   2 +-
 builtin/update-index.c                         |   2 +-
 builtin/update-ref.c                           |   3 +-
 builtin/update-server-info.c                   |   1 +
 builtin/var.c                                  |   5 +-
 builtin/verify-commit.c                        |   1 +
 builtin/verify-pack.c                          |   3 +-
 builtin/verify-tag.c                           |   1 +
 builtin/worktree.c                             |   8 +-
 builtin/write-tree.c                           |   3 +-
 checkout.c                                     |   2 +-
 commit-graph.c                                 |   1 +
 compat/precompose_utf8.c                       |   6 +-
 config.c                                       | 546 +------------------------
 config.h                                       | 139 -------
 connect.c                                      |   6 +-
 contrib/coccinelle/config_fn_ctx.pending.cocci |   2 +-
 convert.c                                      |   2 +-
 daemon.c                                       |   2 +-
 dir.c                                          |   4 +-
 editor.c                                       |   2 +-
 environment.c                                  | 512 +++++++++++++++++++++++
 environment.h                                  |   3 +
 fetch-pack.c                                   |  16 +-
 fsck.c                                         |   1 +
 fsck.h                                         |   2 +-
 fsmonitor.c                                    |   2 +-
 gpg-interface.c                                |   2 +-
 help.c                                         |   6 +-
 http-backend.c                                 |   6 +-
 http-fetch.c                                   |   3 +-
 http.c                                         |   3 +-
 imap-send.c                                    |   3 +-
 list-objects-filter-options.c                  |   6 +-
 ls-refs.c                                      |   2 +-
 mailinfo.c                                     |   1 +
 merge-ll.c                                     |   2 +-
 merge-ort.c                                    |  18 +-
 notes-utils.c                                  |   2 +-
 notes.c                                        |   2 +-
 parallel-checkout.c                            |   4 +-
 pretty.c                                       |   2 +-
 promisor-remote.c                              |   8 +-
 protocol.c                                     |   2 +-
 reachable.c                                    |   2 +-
 read-cache.c                                   |   4 +-
 rebase-interactive.c                           |   2 +-
 reflog.c                                       |   1 +
 refs.c                                         |   2 +-
 refs/packed-backend.c                          |   2 +-
 refs/reftable-backend.c                        |   2 +-
 remote.c                                       |   2 +-
 rerere.c                                       |   9 +-
 revision.c                                     |   2 +-
 run-command.c                                  |   6 +-
 scalar.c                                       |  18 +-
 sequencer.c                                    |  36 +-
 setup.c                                        |  44 +-
 sideband.c                                     |   6 +-
 submodule-config.c                             |   2 +-
 submodule.c                                    |   2 +-
 t/helper/test-advise.c                         |   3 +-
 t/helper/test-config.c                         |  20 +-
 t/helper/test-read-cache.c                     |   3 +-
 t/helper/test-userdiff.c                       |   2 +-
 t/t4256/1/mailinfo.c                           |   2 +-
 t/t4256/1/mailinfo.c.orig                      |   2 +-
 trailer.c                                      |   4 +-
 transport.c                                    |  12 +-
 versioncmp.c                                   |   4 +-
 worktree.c                                     |   8 +-
 xdiff-interface.c                              |   1 +
 161 files changed, 1009 insertions(+), 1096 deletions(-)


---
base-commit: 592f97530d99d182d69c66e08279e189d006b410
change-id: 20250716-pks-config-wo-the-repository-21de9489f965


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

end of thread, other threads:[~2025-07-23 15:29 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 10:49 [PATCH 00/21] config: remove use of `the_repository` Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 01/21] config: drop `git_config()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 02/21] config: drop `git_config_clear()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 03/21] config: drop `git_config_get()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 04/21] config: drop `git_config_get_value()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 05/21] " Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 06/21] config: drop `git_config_get_string_multi()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 07/21] config: drop `git_config_get_string()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 08/21] " Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 09/21] config: drop `git_config_get_int()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 10/21] config: drop `git_config_get_ulong()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 11/21] config: drop `git_config_get_bool()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 12/21] config: drop `git_config_set_in_file()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 13/21] config: drop `git_config_set_gently()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 14/21] config: drop `git_config_set()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 15/21] config: drop `git_config_set_in_file_gently()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 16/21] config: drop `git_config_set_multivar_in_file_gently()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 17/21] config: drop `git_config_get_multivar_gently()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 18/21] config: drop `git_config_set_multivar()` wrapper Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 19/21] config: remove unused `the_repository` wrappers Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 20/21] config: move Git config parsing into "environment.c" Patrick Steinhardt
2025-07-17 10:49 ` [PATCH 21/21] config: fix sign comparison warnings Patrick Steinhardt
2025-07-23  9:38   ` Phillip Wood
2025-07-23 13:38     ` Patrick Steinhardt
2025-07-23 14:08 ` [PATCH v2 00/21] config: remove use of `the_repository` Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 01/21] config: drop `git_config()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 02/21] config: drop `git_config_clear()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 03/21] config: drop `git_config_get()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 04/21] config: drop `git_config_get_value()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 05/21] " Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 06/21] config: drop `git_config_get_string_multi()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 07/21] config: drop `git_config_get_string()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 08/21] " Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 09/21] config: drop `git_config_get_int()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 10/21] config: drop `git_config_get_ulong()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 11/21] config: drop `git_config_get_bool()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 12/21] config: drop `git_config_set_in_file()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 13/21] config: drop `git_config_set_gently()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 14/21] config: drop `git_config_set()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 15/21] config: drop `git_config_set_in_file_gently()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 16/21] config: drop `git_config_set_multivar_in_file_gently()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 17/21] config: drop `git_config_get_multivar_gently()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 18/21] config: drop `git_config_set_multivar()` wrapper Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 19/21] config: remove unused `the_repository` wrappers Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 20/21] config: move Git config parsing into "environment.c" Patrick Steinhardt
2025-07-23 14:08   ` [PATCH v2 21/21] config: fix sign comparison warnings Patrick Steinhardt
2025-07-23 14:48     ` Phillip Wood
2025-07-23 15:29     ` 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).