Git-Raw
view release on metacpan or search on metacpan
deps/libgit2/README.md view on Meta::CPAN
provided as a linkable library with a solid API, allowing to build Git
functionality into your application. Language bindings like
[Rugged](https://github.com/libgit2/rugged) (Ruby),
[LibGit2Sharp](https://github.com/libgit2/libgit2sharp) (.NET),
[pygit2](http://www.pygit2.org/) (Python) and
[NodeGit](http://nodegit.org) (Node) allow you to build Git tooling
in your favorite language.
`libgit2` is used to power Git GUI clients like
[GitKraken](https://gitkraken.com/) and [gmaster](https://gmaster.io/)
and on Git hosting providers like [GitHub](https://github.com/),
[GitLab](https://gitlab.com/) and
[Azure DevOps](https://azure.com/devops).
We perform the merge every time you click "merge pull request".
`libgit2` is licensed under a **very permissive license** (GPLv2 with a special
Linking Exception). This basically means that you can link it (unmodified)
with any kind of software without having to release its source code.
Additionally, the example code has been released to the public domain (see the
[separate license](examples/COPYING) for more information).
Table of Contents
=================
* [Using libgit2](#using-libgit2)
* [Quick Start](#quick-start)
* [Getting Help](#getting-help)
* [What It Can Do](#what-it-can-do)
* [Optional dependencies](#optional-dependencies)
* [Initialization](#initialization)
* [Threading](#threading)
* [Conventions](#conventions)
* [Building libgit2 - Using CMake](#building-libgit2---using-cmake)
* [Building](#building)
* [Installation](#installation)
* [Advanced Usage](#advanced-usage)
* [Compiler and linker options](#compiler-and-linker-options)
* [MacOS X](#macos-x)
* [Android](#android)
* [MinGW](#mingw)
* [Language Bindings](#language-bindings)
* [How Can I Contribute?](#how-can-i-contribute)
* [License](#license)
Using libgit2
=============
Most of these instructions assume that you're writing an application
in C and want to use libgit2 directly. If you're _not_ using C,
and you're writing in a different language or platform like .NET,
Node.js, or Ruby, then there is probably a
"[language binding](#language-bindings)" that you can use to take care
of the messy tasks of calling into native code.
But if you _do_ want to use libgit2 directly - because you're building
an application in C - then you may be able use an existing binary.
There are packages for the
[vcpkg](https://github.com/Microsoft/vcpkg) and
[conan](https://conan.io/center/libgit2)
package managers. And libgit2 is available in
[Homebrew](https://formulae.brew.sh/formula/libgit2) and most Linux
distributions.
However, these versions _may_ be outdated and we recommend using the
latest version if possible. Thankfully libgit2 is not hard to compile.
Quick Start
===========
**Prerequisites** for building libgit2:
1. [CMake](https://cmake.org/), and is recommended to be installed into
your `PATH`.
2. [Python](https://www.python.org) is used by our test framework, and
should be installed into your `PATH`.
3. C compiler: libgit2 is C90 and should compile on most compilers.
* Windows: Visual Studio is recommended
* Mac: Xcode is recommended
* Unix: gcc or clang is recommended.
**Build**
1. Create a build directory beneath the libgit2 source directory, and change
into it: `mkdir build && cd build`
2. Create the cmake build environment: `cmake ..`
3. Build libgit2: `cmake --build .`
Trouble with these steps? Read our [troubleshooting guide](docs/troubleshooting.md).
More detailed build guidance is available below.
Getting Help
============
**Chat with us**
- via IRC: join [#libgit2](https://web.libera.chat/#libgit2) on
[libera](https://libera.chat).
- via Slack: visit [slack.libgit2.org](http://slack.libgit2.org/) to sign up,
then join us in `#libgit2`
**Getting Help**
If you have questions about the library, please be sure to check out the
[API documentation](http://libgit2.github.com/libgit2/). If you still have
questions, reach out to us on Slack or post a question on
[StackOverflow](http://stackoverflow.com/questions/tagged/libgit2) (with the `libgit2` tag).
**Reporting Bugs**
Please open a [GitHub Issue](https://github.com/libgit2/libgit2/issues) and
include as much information as possible. If possible, provide sample code
that illustrates the problem you're seeing. If you're seeing a bug only
on a specific repository, please provide a link to it if possible.
We ask that you not open a GitHub Issue for help, only for bug reports.
**Reporting Security Issues**
Please have a look at SECURITY.md.
What It Can Do
( run in 0.613 second using v1.01-cache-2.11-cpan-5a3173703d6 )