Homec4science

Pass GIT_ENVIRONMENTAL_MAGIC through to hook subprocesses to support Git 2.11.0

Authored by epriestley <git@epriestley.com> on Dec 2 2016, 14:58.

Description

Pass GIT_ENVIRONMENTAL_MAGIC through to hook subprocesses to support Git 2.11.0

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11940

Differential Revision: https://secure.phabricator.com/D16988

Details

Committed
epriestley <git@epriestley.com>Dec 5 2016, 21:45
Pushed
aubortJan 31 2017, 17:16
Parents
rPH6058d3305f82: Normalize remote IP addresses when writing to logs, etc
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH005d8493b034: Pass GIT_ENVIRONMENTAL_MAGIC through to hook subprocesses to support Git 2.11.0 (authored by epriestley <git@epriestley.com>).Dec 5 2016, 21:45