MediaWiki
1.23.2
|
Public Member Functions | |
__construct ( $dir) | |
getCurrentBranch () | |
Return the name of the current branch, or HEAD if not found. More... | |
getHead () | |
Return the HEAD of the repo (without any opening "ref: ") More... | |
getHeadCommitDate () | |
Return the commit date of HEAD entry of the git code repository. More... | |
getHeadSHA1 () | |
Return the SHA1 for the current HEAD of the repo. More... | |
getHeadViewUrl () | |
Get an URL to a web viewer link to the HEAD revision. More... | |
Static Public Member Functions | |
static | currentBranch () |
static | headSHA1 () |
static | headViewUrl () |
static | isSHA1 ( $str) |
Check if a string looks like a hex encoded SHA1 hash. More... | |
static | repo () |
Return a singleton for the repo at $IP. More... | |
Static Protected Member Functions | |
static | getViewers () |
Gets the list of repository viewers. More... | |
Protected Attributes | |
$basedir | |
Location of the .git directory. More... | |
Static Protected Attributes | |
static | $repo = null |
Singleton for the repo at $IP. More... | |
Static Private Attributes | |
static | $viewers = false |
Map of repo URLs to viewer URLs. More... | |
Definition at line 26 of file GitInfo.php.
GitInfo::__construct | ( | $dir | ) |
string | $dir | The root directory of the repo where the .git dir can be found |
Definition at line 46 of file GitInfo.php.
|
static |
Definition at line 224 of file GitInfo.php.
References repo().
Referenced by MWDebug\getDebugInfo().
GitInfo::getCurrentBranch | ( | ) |
Return the name of the current branch, or HEAD if not found.
Definition at line 152 of file GitInfo.php.
References getHead().
GitInfo::getHead | ( | ) |
Return the HEAD of the repo (without any opening "ref: ")
Definition at line 84 of file GitInfo.php.
Referenced by getCurrentBranch(), and getHeadSHA1().
GitInfo::getHeadCommitDate | ( | ) |
Return the commit date of HEAD entry of the git code repository.
Definition at line 129 of file GitInfo.php.
References array(), global, wfEscapeShellArg(), and wfShellExec().
GitInfo::getHeadSHA1 | ( | ) |
Return the SHA1 for the current HEAD of the repo.
Definition at line 104 of file GitInfo.php.
References getHead().
Referenced by getHeadViewUrl().
GitInfo::getHeadViewUrl | ( | ) |
Get an URL to a web viewer link to the HEAD revision.
Definition at line 166 of file GitInfo.php.
References $matches, $repo, array(), as, getHeadSHA1(), wfRestoreWarnings(), and wfSuppressWarnings().
|
staticprotected |
Gets the list of repository viewers.
Definition at line 240 of file GitInfo.php.
References $viewers, array(), global, and wfRunHooks().
|
static |
Definition at line 216 of file GitInfo.php.
References repo().
Referenced by MWDebug\getDebugInfo().
|
static |
Definition at line 232 of file GitInfo.php.
References repo().
Referenced by MWDebug\getDebugInfo().
|
static |
Check if a string looks like a hex encoded SHA1 hash.
string | $str | The string to check |
Definition at line 76 of file GitInfo.php.
|
static |
Return a singleton for the repo at $IP.
Definition at line 62 of file GitInfo.php.
References $IP, $repo, and global.
Referenced by currentBranch(), headSHA1(), and headViewUrl().
|
protected |
Location of the .git directory.
Definition at line 36 of file GitInfo.php.
|
staticprotected |
Singleton for the repo at $IP.
Definition at line 31 of file GitInfo.php.
Referenced by getHeadViewUrl(), and repo().
|
staticprivate |
Map of repo URLs to viewer URLs.
Access via static method getViewers().
Definition at line 41 of file GitInfo.php.
Referenced by getViewers().