Created
December 20, 2011 20:44
-
-
Save lxfontes/1503192 to your computer and use it in GitHub Desktop.
git-php blob
This file contains 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
public static function blob($proj, $path) { | |
$gitBinary = System::get('git_binary'); | |
$cmd = sprintf("GIT_DIR=%s%s %s show HEAD:%s 2>&1", self::$repos[$proj], | |
System::get('repo_suffix'), | |
$gitBinary, | |
escapeshellarg($path)); | |
$content = shell_exec($cmd); | |
return array( | |
'content' => $content, | |
'ext' => 'something' | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment