pkg: run Git as the installation user #24019

Merged
MikeMcQuaid opened 7:05am on September 17, 2026 wanted to merge 137 Ξ” into homebrew/brew main from
pkg-git-install-user

Pull Request Overview

  • Opened on September 17, 2026
  • Status Merged
  • Commit count 1 with first commit September 17, 2026

Total Delta

137 Total Diff Delta

Open Days

Open 1 weekdays

Test Delta

70 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Data pending calculation for pull request

Author avatar

pkg: run Git as the installation user


  • Run repository Git commands and any programs they launch as the selected installation user.

  • Set ownership before Git runs and require a non-root account.

  • Use a system PATH and omit the user's global Git configuration.

  • Check command dispatch and root user rejection in tests.

  • Document installation ownership and when packages need sudo.



  • [x] Have you followed our Contributing guidelines?

  • [x] Have you checked for other open Pull Requests for the same change?

  • [x] Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.

  • [x] Have you explained why you'd like these changes included, not just what they do?

  • [x] For bug fixes, have you given step-by-step brew commands to reproduce the bug?

  • [x] Have you written new tests (excluding integration tests)? Here's an example.

  • [x] Have you successfully run brew lgtm (style, typechecking and tests) locally?



  • [x] I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Codex with GPT 6 Astra at Extra High effort, with local review and testing.


PR was closed without comments.