当前位置: 首页>>代码示例>>PHP>>正文


PHP Git::getCommit方法代码示例

本文整理汇总了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 
}
开发者ID:pombredanne,项目名称:soundcomparisons,代码行数:31,代码来源:topmenu.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];
开发者ID:robotamer,项目名称:php-git,代码行数:31,代码来源:index.php


注:本文中的Git::getCommit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。