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.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 28, 1:04 PM
Unknown Object (File)
Tue, Mar 26, 7:08 PM
Unknown Object (File)
Thu, Mar 7, 1:09 AM
Unknown Object (File)
Thu, Mar 7, 12:27 AM
Unknown Object (File)
Feb 21 2024, 4:26 AM
Unknown Object (File)
Feb 21 2024, 4:26 AM
Unknown Object (File)
Feb 19 2024, 3:44 AM
Unknown Object (File)
Feb 17 2024, 9:49 PM
Subscribers
None

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
Branch
gitenv2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14759
Build 19292: Run Core Tests
Build 19291: arc lint + arc unit

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.