crytoteam/public_html/libgit/base.php

62 lines
1.6 KiB
PHP
Raw Normal View History

<?php
2012-05-05 20:10:55 +02:00
function pretty_dump($input)
{
ob_start();
var_dump($input);
$output = ob_get_contents();
ob_end_clean();
while(preg_match("/^[ ]*[ ]/m", $output) == 1)
{
$output = preg_replace("/^([ ]*)[ ]/m", "$1&nbsp;&nbsp;&nbsp;", $output);
}
$output = nl2br($output);
echo($output);
}
2012-05-05 20:27:36 +02:00
function sha1_from_bin($bin)
{
return bin2hex($bin);
}
2012-05-06 00:43:50 +02:00
function number_from_bin($bin)
{
$c = unpack("N", $bin);
return $c[1];
}
2012-05-06 01:03:07 +02:00
define("OBJ_COMMIT", 1);
define("OBJ_TREE", 2);
define("OBJ_BLOB", 3);
define("OBJ_TAG", 4);
define("OBJ_OFS_DELTA", 6);
define("OBJ_REF_DELTA", 7);
2012-05-05 22:19:35 +02:00
class GitBranchNotFoundException extends Exception {}
2012-05-05 23:01:03 +02:00
class GitTagNotFoundException extends Exception {}
2012-05-05 23:34:24 +02:00
class GitInvalidOriginException extends Exception {}
class GitInvalidElementException extends Exception {}
2012-05-06 00:43:50 +02:00
class GitInvalidFormatException extends Exception {}
class GitUnsupportedVersionException extends Exception {}
2012-05-05 23:34:24 +02:00
class GitPathNotFoundException extends Exception {}
2012-05-06 01:03:07 +02:00
class GitObjectNotFoundException extends Exception {}
2012-05-06 00:43:50 +02:00
class GitCorruptIndexException extends Exception {}
2012-05-06 01:03:07 +02:00
class GitUnknownTypeException extends Exception {}
2012-05-05 22:19:35 +02:00
require(dirname(__FILE__) . "/class.repository.php");
2012-05-05 21:40:16 +02:00
require(dirname(__FILE__) . "/class.branch.php");
require(dirname(__FILE__) . "/class.object.php");
2012-05-05 21:31:08 +02:00
require(dirname(__FILE__) . "/class.blob.php");
require(dirname(__FILE__) . "/class.tag.php");
2012-05-05 20:27:36 +02:00
require(dirname(__FILE__) . "/class.tree.php");
2012-05-05 21:31:08 +02:00
require(dirname(__FILE__) . "/class.tree.element.php");
require(dirname(__FILE__) . "/class.commit.php");
require(dirname(__FILE__) . "/class.actor.php");
2012-05-06 00:43:50 +02:00
require(dirname(__FILE__) . "/class.pack.php");
require(dirname(__FILE__) . "/class.pack.index.php");
?>