Browse Source

Added sha1_from_bin

master
Sven Slootweg 10 years ago
parent
commit
3ada214989
  1. 6
      public_html/libgit/base.php
  2. 2
      public_html/test.php

6
public_html/libgit/base.php

@ -18,8 +18,14 @@ function pretty_dump($input)
echo($output);
}
function sha1_from_bin($bin)
{
return bin2hex($bin);
}
require(dirname(__FILE__) . "/class.repository.php");
require(dirname(__FILE__) . "/class.object.php");
require(dirname(__FILE__) . "/class.tree.php");
require(dirname(__FILE__) . "/class.commit.php");
require(dirname(__FILE__) . "/class.actor.php");
?>

2
public_html/test.php

@ -3,4 +3,6 @@ require("libgit/base.php");
$s = new GitRepository("/home/occupy/testrepo.git");
pretty_dump($s->GetObject("54e03e490b1bee1c154c3545bf258cab0629ee02"));
pretty_dump($s->GetObject("98d99489382a3541e6783bb2083554785f3eb72a"));
pretty_dump($s->GetObject("9d8e0ba4a30f6a5d775a879c42c7de5aed4530c6"));
pretty_dump($s->GetObject("710bfee4440517255475bf7c5454c0bdbb3b3e56"));
Loading…
Cancel
Save