Page MenuHomePhabricator

Pass GIT_ENVIRONMENTAL_MAGIC through to hook subprocesses to support Git 2.11.0

Authored by epriestley on Dec 5 2016, 8:13 PM.
Referenced Files
F12196155: D16988.id40873.diff
Tue, Sep 26, 6:35 PM
F12194647: D16988.id40873.diff
Mon, Sep 25, 4:43 AM
F12169991: D16988.id40873.diff
Thu, Sep 7, 3:09 PM
F12166789: D16988.diff
Thu, Sep 7, 1:59 AM
F12144736: D16988.diff
Thu, Aug 31, 9:36 AM
F12144302: D16988.id40874.diff
Thu, Aug 31, 2:38 AM
F12140840: D16988.id40874.diff
Tue, Aug 29, 7:27 AM
F12135596: D16988.id40875.diff
Aug 25 2023, 3:36 PM



Fixes T11940. In 2.11.0, Git has made a change so that newly-pushed changes are held in a temporary area until the hook accepts or rejects them.

This magic temporary area is only readable if the appropriate GIT_ENVIRONMENTAL_MAGIC variables are available. When executing git commands, pass them through from the calling context.

We're intentionally conservative about which variables we pass, and with good reason (see "httpoxy" in T11359). I think this continues to be the correct default behavior.

Test Plan
  • Upgraded to Git 2.11.0.
  • Tried to push over SSH, got a hook error.
  • Applied patch.
  • Pulled and pushed over SSH.
  • Pulled and pushed over HTTP.

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Pass GIT_ENVIRONMENTAL_MAGIC through to hook subprocesses to support Git 2.11.0.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 5 2016, 8:14 PM
epriestley edited edge metadata.
  • Reorganize $result a little better.
This revision was automatically updated to reflect the committed changes.