承接 delight-im/git-scraper 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

delight-im/git-scraper

最新稳定版本:v1.0.0

Composer 安装命令:

composer require delight-im/git-scraper

包简介

Downloads entire Git repositories from publicly accessible ".git" folders over HTTP

README 文档

README

Downloads entire Git repositories from publicly accessible .git folders over HTTP

  • Directory indexes or directory browsing on the web server are not required
  • Running git update-server-info on the server is not required

Requirements

  • PHP 5.5.0+

Installation

  1. Include the library via Composer [?]:

    $ composer require delight-im/git-scraper
    
  2. Include the Composer autoloader:

    require __DIR__ . '/vendor/autoload.php';

Usage

$scraper = new \Delight\GitScraper\GitScraper('http://www.example.com/.git/');
$scraper->fetch();
// var_dump($scraper->getFiles());
$scraper->download('./');

Terminology

  • hash
    • used to identify objects in Git
    • always uses the SHA-1 algorithm
    • has a length of 20 bytes, 40 hex characters or 160 bits
    • ensures file integrity
  • object
    • stored in .git/objects
    • addressable by its unique hash
    • has a small header describing the type and length of its content
    • compressed with zlib
    • can be previewed (in a slightly modified version) by running the command git cat-file -p {hash}
  • commit object
    • points to a single tree object (stored as 40 hex characters)
    • contains the name and email address of the committer as well as the commit time
    • includes information about the author (may not be the committer) which are analogous to the committer data
    • holds the commit message or description of the commit
    • points to the parent tree as well so that you can browse the history
  • tree object
    • corresponds to a directory on the file system
    • contains pointers to other objects (stored as 20 bytes)
    • tree objects (i.e. sub-directories) and blob objects (i.e. files inside the directory) may be listed here
  • blob object
    • similar to a file on the file system
    • simply a binary representation of the file

Further reading

Contributing

All contributions are welcome! If you wish to contribute, please create an issue first so that your feature, problem or question can be discussed.

Disclaimer

You should probably use this library with your own websites and repositories only.

License

Copyright (c) delight.im <info@delight.im>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

统计信息

  • 总下载量: 34
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 18
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2015-10-24