Changeset View
Changeset View
Standalone View
Standalone View
scripts/repository/commit_hook.php
| #!/usr/bin/env php | #!/usr/bin/env TERM=dumb php | ||||
| <?php | <?php | ||||
| // NOTE: Note that we're specifying TERM=dumb above when invoking the PHP | |||||
| // interpreter. This suppresses an error which looks like this: | |||||
| // | |||||
| // No entry for terminal type "unknown"; | |||||
| // using dumb terminal settings. | |||||
| // | |||||
| // This arises from somewhere in the PHP startup machinery if TERM is not | |||||
| // set to a recognized value. | |||||
btrahan: Huh. Whoda thunk it. | |||||
| // Commit hooks execute in an unusual context where the environment may be | // Commit hooks execute in an unusual context where the environment may be | ||||
| // unavailable, particularly in SVN. The first parameter to this script is | // unavailable, particularly in SVN. The first parameter to this script is | ||||
| // either a bare repository identifier ("X"), or a repository identifier | // either a bare repository identifier ("X"), or a repository identifier | ||||
| // followed by an instance identifier ("X:instance"). If we have an instance | // followed by an instance identifier ("X:instance"). If we have an instance | ||||
| // identifier, unpack it into the environment before we start up. This allows | // identifier, unpack it into the environment before we start up. This allows | ||||
| // subclasses of PhabricatorConfigSiteSource to read it and build an instance | // subclasses of PhabricatorConfigSiteSource to read it and build an instance | ||||
| // environment. | // environment. | ||||
| ▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines | |||||
Huh. Whoda thunk it.