git: 141 call sites use git config operation-mode flags, deprecated since git 2.46.0 #541

Open
opened 2026-09-17 02:47:07 +00:00 by hexajon · 0 comments
Owner

git 2.46.0 deprecated the git config operation-mode options in favour of subcommands:

The operation mode options (like --get) the "git config" command uses have been deprecated and replaced with subcommands (like "git config get").

madtea uses the deprecated form in 141 places:

flag call sites
--get 127
--unset 7
--list 5
--get-regexp 2

The subcommand form is used nowhere.

Why this was not actionable before, and is now

The replacement subcommands arrived in 2.46.0. While the declared floor was 2.38.0 the migration was impossible: git config get does not exist at that floor, so the deprecated form was the only option that worked across the supported range.

Raising the floor to 2.47.3 (#536) removes that bind. Both forms exist at and above the new floor, so the migration becomes possible for the first time.

Scope note

This is a deprecation, not a breakage. The old form still works, including on current git. There is no removal date, and git is conservative about removals. So this is not urgent, and the argument for doing it is that 141 call sites is a large surface to migrate under time pressure later, and the window opened as a side effect of #536.

Checked and clear

Two other deprecations in the same range do not affect madtea:

  • --heads on ls-remote and show-ref, deprecated in 2.46.0 in favour of --branches. Not used.
  • --keep-redundant-commits, soft-deprecated in 2.45.0. Not used.

Acceptance

  • No git config operation-mode flags remain in non-test code.
  • A guard test fails when one is reintroduced, in the same shape as the existing guards against direct git calls and bare --porcelain.

Depends on #536, which raises the floor to a version where the replacement exists.

git 2.46.0 deprecated the `git config` operation-mode options in favour of subcommands: > The operation mode options (like `--get`) the "git config" command uses have been deprecated and replaced with subcommands (like "git config get"). madtea uses the deprecated form in **141 places**: | flag | call sites | |---|---| | `--get` | 127 | | `--unset` | 7 | | `--list` | 5 | | `--get-regexp` | 2 | The subcommand form is used nowhere. ## Why this was not actionable before, and is now The replacement subcommands arrived in **2.46.0**. While the declared floor was 2.38.0 the migration was impossible: `git config get` does not exist at that floor, so the deprecated form was the only option that worked across the supported range. Raising the floor to 2.47.3 (#536) removes that bind. Both forms exist at and above the new floor, so the migration becomes possible for the first time. ## Scope note This is a deprecation, not a breakage. The old form still works, including on current git. There is no removal date, and git is conservative about removals. So this is not urgent, and the argument for doing it is that 141 call sites is a large surface to migrate under time pressure later, and the window opened as a side effect of #536. ## Checked and clear Two other deprecations in the same range do not affect madtea: * `--heads` on `ls-remote` and `show-ref`, deprecated in 2.46.0 in favour of `--branches`. Not used. * `--keep-redundant-commits`, soft-deprecated in 2.45.0. Not used. ## Acceptance * No `git config` operation-mode flags remain in non-test code. * A guard test fails when one is reintroduced, in the same shape as the existing guards against direct git calls and bare `--porcelain`. Depends on #536, which raises the floor to a version where the replacement exists.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
sixfold-space/madtea#541
No description provided.