在没有 Git 的情况下读取 Git 存储库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/645814/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Reading a Git repository, without Git
提问by ANaimi
I'm researching the idea of building a super-small (preferably PHP) web app, which will serve (among other things) as a minimal front-end to a git repository.
我正在研究构建一个超小型(最好是 PHP)Web 应用程序的想法,该应用程序将(除其他外)用作 git 存储库的最小前端。
Any library/article for reading a git repository(".git" folder) without having to execute the "git" process?I'm looking for an API to manage a git repository. I'm only interested in basic functions, such as reading last commits (name of commiter, commit note, date), displaying and traversing branches...
无需执行“git”过程即可读取 git 存储库(“.git”文件夹)的任何库/文章?我正在寻找一个 API 来管理 git 存储库。我只对基本功能感兴趣,例如读取上次提交(提交者名称、提交说明、日期)、显示和遍历分支...
Thanks, ANaimi
谢谢,阿奈米
采纳答案by none
Would this(git API documents) be of any help?
请问这个(GIT API文档)帮上什么忙?
Here's a list of resources about extending php (i.e. to to provide wrappers around other library code):
这是有关扩展 php 的资源列表(即提供其他库代码的包装器):
- extending php - an overview
- writing php extension modules in C
- PHP extension writing
- writing extensions
- Practical PHP Programming:Writing extensions
- Extending PHP: examples
- Writing a PHP Extension
- Extension Writing Part I: Introduction to PHP and Zend
- Zend API: Hacking the Core of PHP
- PHP at the Core: A Hacker's Guide to the Zend Engine
- Creating a PHP5 Extension with MS VC++ 2005
- Writing a PHP Extension (C++)
- 扩展 php - 概述
- 用C编写php扩展模块
- PHP扩展编写
- 写扩展
- 实用PHP编程:编写扩展
- 扩展 PHP:示例
- 编写 PHP 扩展
- 扩展编写第一部分:PHP 和 Zend 介绍
- Zend API:破解 PHP 的核心
- PHP 核心:Zend 引擎的黑客指南
- 使用 MS VC++ 2005 创建 PHP5 扩展
- 编写 PHP 扩展 (C++)
Also, these would seem relevant, too:
此外,这些似乎也很重要:
回答by Pat Notz
You may also want to check out the Cgitproject since they've done something similar (except they build their own git library -- also to avoid running git
directly).
您可能还想查看Cgit项目,因为他们做了类似的事情(除了他们构建自己的 git 库——也避免git
直接运行)。
There's JGit, a pure Java implementation, that may be useful to you.
有JGit,纯Java实现,这可能是对你有用。
回答by Cesare D'Amico
回答by Jakub Nar?bski
I think that best start in such case could be Interfaces Frontends And Toolspage on Git Wiki.
You can find there link to eWiki(github) which supposedly uses native (in PHP) access to Git.
我认为在这种情况下最好的开始可能是Git Wiki 上的Interfaces Frontends And Tools页面。
您可以在那里找到eWiki( github) 的链接,该链接据称使用本机(在 PHP 中)访问 Git。