API: Expose git branch in siteinfo
[lhc/web/wiklou.git] / includes / api / ApiQuerySiteinfo.php
index b0e9bd2..636d798 100644 (file)
@@ -180,6 +180,8 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $git = SpecialVersion::getGitHeadSha1( $GLOBALS['IP'] );
                if ( $git ) {
                        $data['git-hash'] = $git;
+                       $data['git-branch'] =
+                               SpecialVersion::getGitCurrentBranch( $GLOBALS['IP'] );
                } else {
                        $svn = SpecialVersion::getSvnRevision( $GLOBALS['IP'] );
                        if ( $svn ) {