added Git2\Commit\getMessage,getMessageEncoding and parentCount methods · libgit2/php-git@83bc908 · GitHub
Skip to content

Commit 83bc908

Browse files
committed
added Git2\Commit\getMessage,getMessageEncoding and parentCount methods
1 parent 9f37fe3 commit 83bc908

4 files changed

Lines changed: 109 additions & 0 deletions

File tree

‎commit.c‎

Lines changed: 73 additions & 0 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
Check for Git2\Commit::construct
3+
--SKIPIF--
4+
<?php if (!extension_loaded("git2")) print "skip"; ?>
5+
--FILE--
6+
<?php
7+
$repo = new Git2\Repository(__DIR__ . "/mock/001-01");
8+
$commit = $repo->lookup("ab68c54212af15d3545c41057e3a8f2f9ff6fd0d");
9+
10+
echo $commit->parentCount();
11+
--EXPECT--
12+
0
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
Check for Git2\Commit::construct
3+
--SKIPIF--
4+
<?php if (!extension_loaded("git2")) print "skip"; ?>
5+
--FILE--
6+
<?php
7+
$repo = new Git2\Repository(__DIR__ . "/mock/001-01");
8+
$commit = $repo->lookup("ab68c54212af15d3545c41057e3a8f2f9ff6fd0d");
9+
10+
echo $commit->getMessage();
11+
--EXPECT--
12+
initial commit
Lines changed: 12 additions & 0 deletions

0 commit comments

Comments
 (0)