Page MenuHomePhabricator

Install pre-commit hooks in Git repositories
ClosedPublic

Authored by epriestley on Dec 2 2013, 9:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 9:41 AM
Unknown Object (File)
Wed, Nov 27, 12:02 PM
Unknown Object (File)
Nov 26 2024, 4:28 PM
Unknown Object (File)
Nov 23 2024, 1:34 PM
Unknown Object (File)
Nov 18 2024, 7:41 PM
Unknown Object (File)
Nov 15 2024, 9:32 AM
Unknown Object (File)
Nov 14 2024, 4:35 PM
Unknown Object (File)
Nov 11 2024, 8:09 AM
Subscribers

Details

Summary

Ref T4189. T4189 describes most of the intent here:

  • When updating hosted repositories, sync a pre-commit hook into them instead of doing a git fetch.
  • The hook calls into Phabricator. The acting Phabricator user is sent via PHABRICATOR_USER in the environment. The active repository is sent via CLI.
  • The hook doesn't do anything useful yet; it just veifies basic parameters, does a little parsing, and exits 0 to allow the commit.
Test Plan
  • Performed Git pushes and pulls over SSH and HTTP.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Cool. Excited to see how the 3rd party hook stuff ends up working (see T4189)

src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
310

are we implicitly in the.git folder in this case or?

src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
310

Yeah, in the bare case the top level folder is basically the same as ".git/".