You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add Git::Repository::Configuring#global_config facade and deprecated aliases
Implements the global_config(name = nil, value = nil) method on
Git::Repository::Configuring with the same three-way dispatch as config():
- global_config() => Hash of all global config entries
- global_config(name) => String value of one entry
- global_config(name, value) => Git::CommandLineResult
Each mode is backed by a new private helper in the Private module
(global_config_get, global_config_list, global_config_set) that passes
global: true to the existing ConfigOptionSyntax command classes.
Also adds three deprecated forwarding methods for backward compatibility:
- global_config_get(name) - delegates to global_config(name)
- global_config_list - delegates to global_config
- global_config_set(name, value) - delegates to global_config(name, value)
Each deprecated method emits Git::Deprecation.warn and delegates to
global_config; they will be removed in v6.
Git::Base delegators are added for all four methods.
Closes redesign/c1c2_bucket6_lib_orphans.md §3.3. Updates c1c2_audit.md
§7.3 to mark the three global_config_* rows as promoted, and decrements
the human-decision count from 16 to 13.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: redesign/c1c2_audit.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -401,9 +401,9 @@ These require a new facade method before a base.rb delegator can be added.
401
401
|`config_get(name)`| Returns a single config value. Used by tooling. Part of the existing `config()` facade which reads/writes. | 🔍 human decision — expose as `config_get` or fold into `config(name)`? |
402
402
|`config_list`| Returns full config hash. Used by tooling. | 🔍 human decision — expose separately or fold into `config()`? |
403
403
|`config_set(name, value, options)`| Sets a config value. | 🔍 human decision — expose separately or fold into `config(name, value)`? |
404
-
|`global_config_get(name)`| Gets a global config value. |🔍 human decision|
405
-
|`global_config_list`| Returns the full global config hash. |🔍 human decision|
406
-
|`global_config_set(name, value)`| Sets a global config value. |🔍 human decision|
404
+
|`global_config_get(name)`| Gets a global config value. |✅ promoted — `global_config` facade + deprecated aliases in `Git::Repository::Configuring` + `Git::Base` delegators added (PR 5h-3)|
405
+
|`global_config_list`| Returns the full global config hash. |✅ promoted — `global_config` facade + deprecated aliases in `Git::Repository::Configuring` + `Git::Base` delegators added (PR 5h-3)|
406
+
|`global_config_set(name, value)`| Sets a global config value. |✅ promoted — `global_config` facade + deprecated aliases in `Git::Repository::Configuring` + `Git::Base` delegators added (PR 5h-3)|
407
407
|`git_version`| Returns `Git::Version` for the current binary. Useful for tooling that conditionally enables features. Not a repository concern; `Git.git_version` is the canonical API. | ✅ delegator added to `Git::Base` — delegates to `Git.git_version`|
408
408
|`list_files(ref_dir)`| Lists files under `.git/refs/{ref_dir}`. Internal ref-filesystem access. No plausible clean public use. | ❌ remove — internal plumbing; direct callers should migrate to `Git::Repository` ref-inspection methods |
Copy file name to clipboardExpand all lines: redesign/c1c2_bucket6_lib_orphans.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -326,6 +326,8 @@ These can be removed in v6 after a full deprecation cycle.
326
326
327
327
**Decision:** Accepted. Add `global_config(name = nil, value = nil)` to `Git::Repository::Configuring` with three-way dispatch (list/get/set). Add deprecated forwarding methods `global_config_get`, `global_config_list`, `global_config_set` with `Git::Deprecation.warn` calls. Add `Git::Base` delegators for all four. Remove deprecated aliases in v6.
328
328
329
+
**Implemented in PR 5h-3.**`global_config` facade added to `Git::Repository::Configuring` with three-way dispatch; private helpers `global_config_get/list/set` in the `Private` module; deprecated forwarding methods on the public API; `Git::Base` delegators for all four methods.
0 commit comments