Last active
December 13, 2015 17:28
-
-
Save fritz0705/4948270 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_head_commit($dir = "./") { | |
$head = explode(": ", file_get_contents($dir . "/HEAD")); | |
assert($head[0] == "ref"); | |
$head = $head[1]; | |
$head = file_get_contents($dir . "/" . $head); | |
return $head; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment