Changeset View
Changeset View
Standalone View
Standalone View
scripts/repository/commit_hook.php
| #!/usr/bin/env TERM=dumb php | #!/usr/bin/env php | ||||
| <?php | <?php | ||||
| // NOTE: Note that we're specifying TERM=dumb above when invoking the PHP | // NOTE: This script will sometimes emit a warning like this on startup: | ||||
| // interpreter. This suppresses an error which looks like this: | |||||
| // | // | ||||
| // No entry for terminal type "unknown"; | // No entry for terminal type "unknown"; | ||||
| // using dumb terminal settings. | // using dumb terminal settings. | ||||
| // | // | ||||
| // This arises from somewhere in the PHP startup machinery if TERM is not | // This can be fixed by adding "TERM=dumb" to the shebang line, but doing so | ||||
| // set to a recognized value. | // causes some systems to hang mysteriously. See T7119. | ||||
| // 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 151 Lines • Show Last 20 Lines | |||||