Page MenuHomePhabricator

Pass GIT_ENVIRONMENTAL_MAGIC through to hook subprocesses to support Git 2.11.0
ClosedPublic

Authored by epriestley on Dec 5 2016, 8:13 PM.

Details

Summary

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

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley updated this revision to Diff 40873.Dec 5 2016, 8:13 PM
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.
epriestley updated this object.Dec 5 2016, 8:13 PM
chad accepted this revision.Dec 5 2016, 8:14 PM
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 5 2016, 8:14 PM
epriestley updated this revision to Diff 40874.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.