Summary
While investigating #5281, I found that the standalone-packages refactor (commit 929c82fe4) ported Git command-building from the old monolithic src/env/node/git/git.ts into the new packages/git-cli/src/providers/* from a slightly stale snapshot, silently dropping several host→library config wirings. As a result, a handful of VS Code / GitLens settings stopped affecting Git behavior. Each is independently reproducible.
Regressions
-
Force push ignores git.useForcePushWithLease / git.useForcePushIfIncludes
- GitLens always force-pushes with
--force-with-lease --force-if-includes, even when the user set git.useForcePushWithLease to false — and the Push confirmation labels the action as a plain --force.
- Effect: users who need a plain
--force can't do one via GitLens, and a push can be rejected (with-lease) when the user intended an unconditional force.
packages/git-cli/src/providers/operations.ts (push) hardcoded { withLease: true, ifIncludes: true }.
-
gitlens.advanced.similarityThreshold ignored for diff file listings
getDiffStatus used a bare -M, so rename detection used Git's default 50% threshold instead of the configured value.
packages/git-cli/src/providers/diff.ts.
-
gitlens.advanced.similarityThreshold ignored for Git status
getStatus / getStatusForPathCore didn't forward the threshold to --find-renames, so status, working changes (WIP), and stash file lists used Git's default 50%.
packages/git-cli/src/providers/status.ts.
-
git.enableCommitSigning no longer honored
getSigningConfig only checked the repo's commit.gpgsign, so users who enabled signing solely via VS Code's git.enableCommitSigning (without commit.gpgsign) were reported as signing-disabled, and GitLens-driven commits (e.g. the Commit Composer) wouldn't sign.
packages/git-cli/src/providers/config.ts.
Root cause
The refactor's manual port omitted the host→library wiring for these settings. The library should receive them via GitServiceConfig / context.config (set in src/git/gitProviderContext.ts) and consume them in the providers.
Fix
Fixed in #5325 (alongside #5281). Each regression is a separate commit; the wiring follows the established GitServiceConfig pattern — new config.push and config.signing surfaces, and reuse of the existing config.commits.similarityThreshold.
Summary
While investigating #5281, I found that the standalone-packages refactor (commit
929c82fe4) ported Git command-building from the old monolithicsrc/env/node/git/git.tsinto the newpackages/git-cli/src/providers/*from a slightly stale snapshot, silently dropping several host→library config wirings. As a result, a handful of VS Code / GitLens settings stopped affecting Git behavior. Each is independently reproducible.Regressions
Force push ignores
git.useForcePushWithLease/git.useForcePushIfIncludes--force-with-lease --force-if-includes, even when the user setgit.useForcePushWithLeasetofalse— and the Push confirmation labels the action as a plain--force.--forcecan't do one via GitLens, and a push can be rejected (with-lease) when the user intended an unconditional force.packages/git-cli/src/providers/operations.ts(push) hardcoded{ withLease: true, ifIncludes: true }.gitlens.advanced.similarityThresholdignored for diff file listingsgetDiffStatusused a bare-M, so rename detection used Git's default 50% threshold instead of the configured value.packages/git-cli/src/providers/diff.ts.gitlens.advanced.similarityThresholdignored for Git statusgetStatus/getStatusForPathCoredidn't forward the threshold to--find-renames, so status, working changes (WIP), and stash file lists used Git's default 50%.packages/git-cli/src/providers/status.ts.git.enableCommitSigningno longer honoredgetSigningConfigonly checked the repo'scommit.gpgsign, so users who enabled signing solely via VS Code'sgit.enableCommitSigning(withoutcommit.gpgsign) were reported as signing-disabled, and GitLens-driven commits (e.g. the Commit Composer) wouldn't sign.packages/git-cli/src/providers/config.ts.Root cause
The refactor's manual port omitted the host→library wiring for these settings. The library should receive them via
GitServiceConfig/context.config(set insrc/git/gitProviderContext.ts) and consume them in the providers.Fix
Fixed in #5325 (alongside #5281). Each regression is a separate commit; the wiring follows the established
GitServiceConfigpattern — newconfig.pushandconfig.signingsurfaces, and reuse of the existingconfig.commits.similarityThreshold.