]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/config-wo-the-repository'
authorJunio C Hamano <gitster@pobox.com>
Fri, 23 Aug 2024 16:02:34 +0000 (09:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 Aug 2024 16:02:34 +0000 (09:02 -0700)
Use of API functions that implicitly depend on the_repository
object in the config subsystem has been rewritten to pass a
repository object through the callchain.

* ps/config-wo-the-repository:
  config: hide functions using `the_repository` by default
  global: prepare for hiding away repo-less config functions
  config: don't depend on `the_repository` with branch conditions
  config: don't have setters depend on `the_repository`
  config: pass repo to functions that rename or copy sections
  config: pass repo to `git_die_config()`
  config: pass repo to `git_config_get_expiry_in_days()`
  config: pass repo to `git_config_get_expiry()`
  config: pass repo to `git_config_get_max_percent_split_change()`
  config: pass repo to `git_config_get_split_index()`
  config: pass repo to `git_config_get_index_threads()`
  config: expose `repo_config_clear()`
  config: introduce missing setters that take repo as parameter
  path: hide functions using `the_repository` by default
  path: stop relying on `the_repository` in `worktree_git_path()`
  path: stop relying on `the_repository` when reporting garbage
  hooks: remove implicit dependency on `the_repository`
  editor: do not rely on `the_repository` for interactive edits
  path: expose `do_git_common_path()` as `repo_common_pathv()`
  path: expose `do_git_path()` as `repo_git_pathv()`

23 files changed:
1  2 
add-patch.c
builtin/checkout.c
builtin/clone.c
builtin/fast-import.c
builtin/fsck.c
builtin/gc.c
builtin/notes.c
builtin/rebase.c
builtin/receive-pack.c
builtin/remote.c
builtin/submodule--helper.c
builtin/worktree.c
config.c
read-cache.c
refs.c
refs/packed-backend.c
refs/reftable-backend.c
rerere.c
revision.c
sequencer.c
submodule.c
transport.c
worktree.c

diff --cc add-patch.c
Simple merge
Simple merge
diff --cc builtin/clone.c
Simple merge
Simple merge
diff --cc builtin/fsck.c
Simple merge
diff --cc builtin/gc.c
Simple merge
diff --cc builtin/notes.c
Simple merge
Simple merge
Simple merge
index 874f14a823eb35d6c37d468dec682fc154017788,fef3026ef4054ea6dcdb90e27b3517dad343ad00..d1f9292ed2b292afb763618ba3103e2d3c6f519d
@@@ -960,10 -944,8 +960,10 @@@ static int rm(int argc, const char **ar
  
        if (!result) {
                strbuf_addf(&buf, "remote.%s", remote->name);
-               if (git_config_rename_section(buf.buf, NULL) < 1) {
 -              if (repo_config_rename_section(the_repository, buf.buf, NULL) < 1)
 -                      return error(_("Could not remove config section '%s'"), buf.buf);
++              if (repo_config_rename_section(the_repository, buf.buf, NULL) < 1) {
 +                      result = error(_("Could not remove config section '%s'"), buf.buf);
 +                      goto out;
 +              }
  
                handle_push_default(remote->name, NULL);
        }
Simple merge
Simple merge
diff --cc config.c
Simple merge
diff --cc read-cache.c
Simple merge
diff --cc refs.c
Simple merge
Simple merge
Simple merge
diff --cc rerere.c
Simple merge
diff --cc revision.c
Simple merge
diff --cc sequencer.c
Simple merge
diff --cc submodule.c
Simple merge
diff --cc transport.c
Simple merge
diff --cc worktree.c
Simple merge