dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "jsduck: Add @inheritable to static methods from jQuery plugins"
[lhc/web/wiklou.git]
/
includes
/
GitInfo.php
diff --git
a/includes/GitInfo.php
b/includes/GitInfo.php
index
877c2d2
..
6b092d9
100644
(file)
--- a/
includes/GitInfo.php
+++ b/
includes/GitInfo.php
@@
-82,18
+82,18
@@
class GitInfo {
* @return string The HEAD
*/
public function getHead() {
* @return string The HEAD
*/
public function getHead() {
- $
HEADf
ile = "{$this->basedir}/HEAD";
+ $
headF
ile = "{$this->basedir}/HEAD";
- if ( !is_readable( $
HEADf
ile ) ) {
+ if ( !is_readable( $
headF
ile ) ) {
return false;
}
return false;
}
- $
HEAD = file_get_contents( $HEADf
ile );
+ $
head = file_get_contents( $headF
ile );
- if ( preg_match( "/ref: (.*)/", $
HEAD
, $m ) ) {
+ if ( preg_match( "/ref: (.*)/", $
head
, $m ) ) {
return rtrim( $m[1] );
} else {
return rtrim( $m[1] );
} else {
- return rtrim( $
HEAD
);
+ return rtrim( $
head
);
}
}
}
}
@@
-102,20
+102,20
@@
class GitInfo {
* @return string A SHA1 or false
*/
public function getHeadSHA1() {
* @return string A SHA1 or false
*/
public function getHeadSHA1() {
- $
HEAD
= $this->getHead();
+ $
head
= $this->getHead();
// If detached HEAD may be a SHA1
// If detached HEAD may be a SHA1
- if ( self::isSHA1( $
HEAD
) ) {
- return $
HEAD
;
+ if ( self::isSHA1( $
head
) ) {
+ return $
head
;
}
// If not a SHA1 it may be a ref:
}
// If not a SHA1 it may be a ref:
- $
REFfile = "{$this->basedir}/{$HEAD
}";
- if ( !is_readable( $
REFf
ile ) ) {
+ $
refFile = "{$this->basedir}/{$head
}";
+ if ( !is_readable( $
refF
ile ) ) {
return false;
}
return false;
}
- $sha1 = rtrim( file_get_contents( $
REFf
ile ) );
+ $sha1 = rtrim( file_get_contents( $
refF
ile ) );
return $sha1;
}
return $sha1;
}
@@
-150,11
+150,11
@@
class GitInfo {
* @return string The branch name, HEAD, or false
*/
public function getCurrentBranch() {
* @return string The branch name, HEAD, or false
*/
public function getCurrentBranch() {
- $
HEAD
= $this->getHead();
- if ( $
HEAD && preg_match( "#^refs/heads/(.*)$#", $HEAD
, $m ) ) {
+ $
head
= $this->getHead();
+ if ( $
head && preg_match( "#^refs/heads/(.*)$#", $head
, $m ) ) {
return $m[1];
} else {
return $m[1];
} else {
- return $
HEAD
;
+ return $
head
;
}
}
}
}