Skip to content

refactor(runway): compose the checkout git env from gitexec - #613

Open
behinddwalls wants to merge 1 commit into
preetam/merger-shared-gitexecfrom
preetam/runway-wiring-gitexec
Open

refactor(runway): compose the checkout git env from gitexec#613
behinddwalls wants to merge 1 commit into
preetam/merger-shared-gitexecfrom
preetam/runway-wiring-gitexec

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

runGit in the Runway server's checkout provisioning kept its own copy of the scrubbed-plus-transport environment. Build it through gitexec.Env instead — the same source the merger uses — so provisioning and merging assemble an identical environment from one definition.

This also closes a gap the two hand-written copies had already opened: provisioning omitted GIT_ATTR_NOSYSTEM and the no-pager/no-editor settings the merge path sets, so a system gitattributes file could influence the initial checkout but not later merge operations. Both now run under the same scrub set.

Test Plan

//service/runway/server green. Provisioning and merge paths now assemble an identical git environment from one source.

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

cmd.Env = append(cmd.Env, name+"="+v)
}
}
cmd.Env = gitexec.Env(gitexec.EnvOptions{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this include Passthrough: runtime.PassthroughEnv, matching the merger’s environment construction? Otherwise a custom transport variable works during merging but not during the provisioning fetch. The current server does not populate this field, but it leaves the two paths short of the stated identical environment.

runGit in the Runway server's checkout provisioning kept its own copy of the scrubbed-plus-transport environment. Build it through gitexec.Env instead — the same source the merger uses — so provisioning and merging assemble an identical environment from one definition.

This also closes a gap the two hand-written copies had already opened: provisioning omitted GIT_ATTR_NOSYSTEM and the no-pager/no-editor settings the merge path sets, so a system gitattributes file could influence the initial checkout but not later merge operations. Both now run under the same scrub set.
@behinddwalls
behinddwalls force-pushed the preetam/runway-wiring-gitexec branch from 1db5645 to 301e75f Compare August 19, 2026 15:38
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.

2 participants