Coder Social home page Coder Social logo

gitorious / git-archive-daemon Goto Github PK

View Code? Open in Web Editor NEW
14.0 6.0 3.0 256 KB

Git Archive Daemon (mirror of https://gitorious.org/gitorious/git-archive-daemon)

Home Page: https://gitorious.org

License: GNU Affero General Public License v3.0

Go 96.70% Shell 3.30%

git-archive-daemon's Introduction

git-archive-daemon

Build Status

git-archive-daemon is a scalable, high-performance HTTP API for serving archives of git repositories.

It utilizes git archive tool for actual archive generation.

Features

  • Laziness - Archives are generated on demand, when they're requested.
  • Caching - Requests for the same combination of tree, prefix and format are served from a disk cache.
  • Work pooling - Archiving is done by workers from a configurable, fixed size pool. This allows for putting predictable, limited load on the machine.
  • Request grouping - When the archive is not cached then all requests for it are grouped together, waiting for the single archiving job to complete. This avoids duplicate work and allows git-archive-daemon to handle high volume of requests.

Installation

Currently you need Go development environment to build git-archive-daemon.

The following command will fetch the package and build the binary at $GOPATH/bin/git-archive-daemon:

go get gitorious.org/gitorious/git-archive-daemon

Usage

Starting

Usage:

git-archive-daemon [options]

Options:

  • -r <repos-dir> - Directory containing git repositories, defaults to "."
  • -c <cache-dir> - Cache dir for storing archives, defaults to "."
  • -t <tmp-dir> - Tmp dir for archive generation, defaults to system tmp dir
  • -l <[addr]:port> - Address/port to listen on, defaults to 127.0.0.1:5000
  • -w <workers> - Number of workers, defaults to 10

Example:

git-archive-daemon -r /var/git/repositories -c /var/cache/archives -l :80

API

GET /<repo-path>[?params]

Params:

  • ref - branch/tag name or commit sha
  • format - tar.gz or zip
  • prefix - (optional) prepended to each filename in the archive (passed to git archive via --prefix option)
  • filename - (optional) filename for the response, returned in Content-Disposition: attachment HTTP header.

Example:

GET /my-project/repo?ref=master&format=tar.gz&prefix=my-project/

This will generate and send tar.gz archive of master branch of repository at <repos-dir>/my-project/repo.

License

git-archive-daemon is free software licensed under the GNU Affero General Public License. git-archive-daemon is developed as part of the Gitorious project.

git-archive-daemon's People

Contributors

ku1ik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tmhorne ulas206

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.