本文整理汇总了PHP中Git::getCommit方法的典型用法代码示例。如果您正苦于以下问题:PHP Git::getCommit方法的具体用法?PHP Git::getCommit怎么用?PHP Git::getCommit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Git
的用法示例。
在下文中一共展示了Git::getCommit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Tables
if (session_mayEdit($dbConnection)) {
echo '<li class="nav">' . '<a class="dropdown-toggle topLink" data-toggle="dropdown">' . 'Upload <b class="caret"></b></a>' . '<ul class="dropdown-menu">' . '<li><a href="dbimport.php">Data Tables (CSV format)</a></li>' . '<li><a href="sqlFrontend.php">Transcription Records (SQL format)</a></li>' . '</ul></li>';
}
?>
<li><a href="userAccount.php">User account</a></li>
<?php
if (session_mayEdit($dbConnection)) {
echo '<li class="nav">' . '<a class="dropdown-toggle topLink" data-toggle="dropdown">' . 'Diagnostics <b class="caret"></b></a>' . '<ul class="dropdown-menu">' . '<li><a href="missingSounds.php">Missing sounds</a></li>' . '<li><a href="integrity.php">DB Integrity</a></li>' . '<li><a href="clearCache.php">Clear cache</a></li>' . '</ul></li>';
}
?>
<li><a href="index.php?action=meanings">Meanings</a></li>
<li><a href="index.php?action=logout">Logout</a></li>
</ul>
<?php
require_once '../Git.php';
if ($g = Git::getCommit('../.git')) {
?>
<ul class="nav pull-right" id="topMenu" data-isadmin="<?php
echo $isAdmin;
?>
">
<li><a href="<?php
echo $g['link'];
?>
" target="_blank"><?php
echo $g['text'];
?>
</a></li>
</ul>
<?php
}
示例2: Git
*/
define("GIT_DIR", "/home/crodas/projects/playground/phpgit/.git");
#define("GIT_DIR", "/home/crodas/projects/git/.git");
#define("GIT_DIR", "/home/crodas/projects/playground/phpserver/phplibtextcat/.git");
#define("GIT_DIR","/home/crodas/projects/bigfs/.git/");
#define("GIT_DIR", "/var/www/html/wp/phptc.git");
require "phpgit/git.php";
try {
$git = new Git(GIT_DIR);
} catch (Exception $e) {
die(GIT_DIR . " is not a valid git directory");
}
/* commit file list */
if (isset($_GET['commit'])) {
$commit = $_GET['commit'];
$commit = $git->getCommit($commit);
$file_list =& $commit['Tree'];
} else {
if (isset($_GET['file'])) {
/* it is a file */
$object = $git->getFile($_GET['file'], $type);
if ($type == OBJ_TREE) {
$file_list =& $object;
} else {
$content =& $object;
}
} else {
if (isset($_GET['diff'])) {
include "phpgit/contrib/diff.php";
$diff = $git->getCommitDiff($_GET['diff']);
$changes = $diff[0];