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, Apr 25, 2:25 AM
Unknown Object (File)
Wed, Apr 24, 10:47 AM
Unknown Object (File)
Wed, Apr 24, 10:47 AM
Unknown Object (File)
Wed, Apr 24, 10:47 AM
Unknown Object (File)
Tue, Apr 23, 8:53 PM
Unknown Object (File)
Fri, Apr 19, 5:49 PM
Unknown Object (File)
Tue, Apr 16, 4:35 AM
Unknown Object (File)
Sat, Mar 30, 3:16 AM
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 14760
Build 19294: Run Core Tests
Build 19293: 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.