Skip to content

Standalone-packages refactor dropped host-config wiring (force-push, similarity threshold, commit signing settings ignored) #5326

@ianhattendorf

Description

@ianhattendorf

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

  1. 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 }.
  2. 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.
  3. 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.
  4. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions