Skip to content

feat(git/exec): a shared environment composer for git commands - #610

Open
behinddwalls wants to merge 1 commit into
preetam/git-plumbing-relocatefrom
preetam/git-exec-env-composer
Open

feat(git/exec): a shared environment composer for git commands#610
behinddwalls wants to merge 1 commit into
preetam/git-plumbing-relocatefrom
preetam/git-exec-env-composer

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add Env(EnvOptions) as the single place that builds a git command's environment: the always-applied scrub set, plus transport variables inherited from the parent when set (SSH agent, PATH, TLS, proxy), plus caller-supplied literals appended last so they override. Re-express Command in terms of Env so there is one composer, not two.

This gives the change provider's repository and the Runway merger one source of truth to build on instead of each keeping its own copy of the scrub set and transport list. HOME is intentionally excluded from the shared transport list, since callers that isolate HOME and callers that inherit it disagree; each supplies it through Literal or Passthrough.

Test Plan

✅ new gitexec unit tests: scrub set always present, transport vars inherited only when set, literals override, and HOME is absent from the shared transport list. Existing Command consumers build unchanged.

Stack

  1. refactor(git): relocate platform/gitexec under platform/git #609
  2. @ feat(git/exec): a shared environment composer for git commands #610
  3. refactor(changeprovider): make the git provider pure logic over a contract #611
  4. refactor(merger): build the git command env from the shared composer #612
  5. refactor(runway): compose the checkout git env from gitexec #613

Add Env(EnvOptions) as the single place that builds a git command's environment: the always-applied scrub set, plus transport variables inherited from the parent when set (SSH agent, PATH, TLS, proxy), plus caller-supplied literals appended last so they override. Re-express Command in terms of Env so there is one composer, not two.

This gives the change provider's repository and the Runway merger one source of truth to build on instead of each keeping its own copy of the scrub set and transport list. HOME is intentionally excluded from the shared transport list, since callers that isolate HOME and callers that inherit it disagree; each supplies it through Literal or Passthrough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant