]>
Commit | Line | Data |
---|---|---|
4b7483a2 | 1 | libgit2 - the Git linkable library |
20b5d300 | 2 | ================================== |
4b7483a2 | 3 | |
ac3d33df JK |
4 | | Build Status | | |
5 | | ------------ | - | | |
c25aa7cd | 6 | | **main** branch CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush) | |
e579e0f7 MB |
7 | | **v1.4 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.4&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.4) | |
8 | | **v1.3 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.3&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.3) | | |
c25aa7cd | 9 | | **Nightly** builds | [![Nightly Build](https://github.com/libgit2/libgit2/workflows/Nightly%20Build/badge.svg)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22Nightly+Build%22) [![Coverity Scan Status](https://scan.coverity.com/projects/639/badge.svg)](https://scan.coverity.com/projects/639) | |
37029314 | 10 | |
486bc366 | 11 | `libgit2` is a portable, pure C implementation of the Git core methods |
eae0bfdc PP |
12 | provided as a linkable library with a solid API, allowing to build Git |
13 | functionality into your application. Language bindings like | |
14 | [Rugged](https://github.com/libgit2/rugged) (Ruby), | |
15 | [LibGit2Sharp](https://github.com/libgit2/libgit2sharp) (.NET), | |
16 | [pygit2](http://www.pygit2.org/) (Python) and | |
17 | [NodeGit](http://nodegit.org) (Node) allow you to build Git tooling | |
18 | in your favorite language. | |
19 | ||
20 | `libgit2` is used to power Git GUI clients like | |
21 | [GitKraken](https://gitkraken.com/) and [gmaster](https://gmaster.io/) | |
22 | and on Git hosting providers like [GitHub](https://github.com/), | |
23 | [GitLab](https://gitlab.com/) and | |
6c7cee42 | 24 | [Azure DevOps](https://azure.com/devops). |
eae0bfdc | 25 | We perform the merge every time you click "merge pull request". |
4b7483a2 | 26 | |
dcfdb977 BS |
27 | `libgit2` is licensed under a **very permissive license** (GPLv2 with a special |
28 | Linking Exception). This basically means that you can link it (unmodified) | |
29 | with any kind of software without having to release its source code. | |
30 | Additionally, the example code has been released to the public domain (see the | |
31 | [separate license](examples/COPYING) for more information). | |
b760fbf5 | 32 | |
ac3d33df JK |
33 | Table of Contents |
34 | ================= | |
35 | ||
c25aa7cd | 36 | * [Using libgit2](#using-libgit2) |
ac3d33df JK |
37 | * [Quick Start](#quick-start) |
38 | * [Getting Help](#getting-help) | |
39 | * [What It Can Do](#what-it-can-do) | |
40 | * [Optional dependencies](#optional-dependencies) | |
41 | * [Initialization](#initialization) | |
42 | * [Threading](#threading) | |
43 | * [Conventions](#conventions) | |
44 | * [Building libgit2 - Using CMake](#building-libgit2---using-cmake) | |
45 | * [Building](#building) | |
46 | * [Installation](#installation) | |
47 | * [Advanced Usage](#advanced-usage) | |
48 | * [Compiler and linker options](#compiler-and-linker-options) | |
49 | * [MacOS X](#macos-x) | |
50 | * [Android](#android) | |
22a2d3d5 | 51 | * [MinGW](#mingw) |
ac3d33df JK |
52 | * [Language Bindings](#language-bindings) |
53 | * [How Can I Contribute?](#how-can-i-contribute) | |
54 | * [License](#license) | |
55 | ||
c25aa7cd PP |
56 | Using libgit2 |
57 | ============= | |
58 | ||
59 | Most of these instructions assume that you're writing an application | |
60 | in C and want to use libgit2 directly. If you're _not_ using C, | |
61 | and you're writing in a different language or platform like .NET, | |
62 | Node.js, or Ruby, then there is probably a | |
63 | "[language binding](#language-bindings)" that you can use to take care | |
64 | of the messy tasks of calling into native code. | |
65 | ||
66 | But if you _do_ want to use libgit2 directly - because you're building | |
67 | an application in C - then you may be able use an existing binary. | |
68 | There are packages for the | |
69 | [vcpkg](https://github.com/Microsoft/vcpkg) and | |
70 | [conan](https://conan.io/center/libgit2) | |
71 | package managers. And libgit2 is available in | |
72 | [Homebrew](https://formulae.brew.sh/formula/libgit2) and most Linux | |
73 | distributions. | |
74 | ||
75 | However, these versions _may_ be outdated and we recommend using the | |
76 | latest version if possible. Thankfully libgit2 is not hard to compile. | |
77 | ||
eae0bfdc PP |
78 | Quick Start |
79 | =========== | |
80 | ||
81 | **Prerequisites** for building libgit2: | |
82 | ||
83 | 1. [CMake](https://cmake.org/), and is recommended to be installed into | |
84 | your `PATH`. | |
85 | 2. [Python](https://www.python.org) is used by our test framework, and | |
86 | should be installed into your `PATH`. | |
87 | 3. C compiler: libgit2 is C90 and should compile on most compilers. | |
88 | * Windows: Visual Studio is recommended | |
89 | * Mac: Xcode is recommended | |
90 | * Unix: gcc or clang is recommended. | |
91 | ||
92 | **Build** | |
93 | ||
94 | 1. Create a build directory beneath the libgit2 source directory, and change | |
95 | into it: `mkdir build && cd build` | |
96 | 2. Create the cmake build environment: `cmake ..` | |
97 | 3. Build libgit2: `cmake --build .` | |
98 | ||
22a2d3d5 | 99 | Trouble with these steps? Read our [troubleshooting guide](docs/troubleshooting.md). |
ac3d33df | 100 | More detailed build guidance is available below. |
eae0bfdc | 101 | |
2976dcf8 ET |
102 | Getting Help |
103 | ============ | |
3e3d332b | 104 | |
22a2d3d5 | 105 | **Chat with us** |
2976dcf8 | 106 | |
c25aa7cd PP |
107 | - via IRC: join [#libgit2](https://web.libera.chat/#libgit2) on |
108 | [libera](https://libera.chat). | |
22a2d3d5 UG |
109 | - via Slack: visit [slack.libgit2.org](http://slack.libgit2.org/) to sign up, |
110 | then join us in `#libgit2` | |
2976dcf8 ET |
111 | |
112 | **Getting Help** | |
113 | ||
114 | If you have questions about the library, please be sure to check out the | |
115 | [API documentation](http://libgit2.github.com/libgit2/). If you still have | |
116 | questions, reach out to us on Slack or post a question on | |
117 | [StackOverflow](http://stackoverflow.com/questions/tagged/libgit2) (with the `libgit2` tag). | |
118 | ||
119 | **Reporting Bugs** | |
120 | ||
121 | Please open a [GitHub Issue](https://github.com/libgit2/libgit2/issues) and | |
122 | include as much information as possible. If possible, provide sample code | |
123 | that illustrates the problem you're seeing. If you're seeing a bug only | |
124 | on a specific repository, please provide a link to it if possible. | |
125 | ||
126 | We ask that you not open a GitHub Issue for help, only for bug reports. | |
4b7483a2 | 127 | |
eae0bfdc PP |
128 | **Reporting Security Issues** |
129 | ||
22a2d3d5 | 130 | Please have a look at SECURITY.md. |
eae0bfdc | 131 | |
4b7483a2 | 132 | What It Can Do |
20b5d300 | 133 | ============== |
4b7483a2 | 134 | |
1e27b89f ET |
135 | libgit2 provides you with the ability to manage Git repositories in the |
136 | programming language of your choice. It's used in production to power many | |
6c7cee42 | 137 | applications including GitHub.com, Plastic SCM and Azure DevOps. |
8f064000 CMN |
138 | |
139 | It does not aim to replace the git tool or its user-facing commands. Some APIs | |
140 | resemble the plumbing commands as those align closely with the concepts of the | |
141 | Git system, but most commands a user would type are out of scope for this | |
142 | library to implement directly. | |
143 | ||
144 | The library provides: | |
c5b97d5a | 145 | |
b760fbf5 | 146 | * SHA conversions, formatting and shortening |
5689a8d5 | 147 | * abstracted ODB backend system |
7548b8af | 148 | * commit, tag, tree and blob parsing, editing, and write-back |
4b7483a2 | 149 | * tree traversal |
b760fbf5 VM |
150 | * revision walking |
151 | * index file (staging area) manipulation | |
b760fbf5 | 152 | * reference management (including packed references) |
7548b8af VM |
153 | * config file management |
154 | * high level repository management | |
155 | * thread safety and reentrancy | |
156 | * descriptive and detailed error messages | |
157 | * ...and more (over 175 different API calls) | |
b760fbf5 | 158 | |
19a04f67 PS |
159 | As libgit2 is purely a consumer of the Git system, we have to |
160 | adjust to changes made upstream. This has two major consequences: | |
161 | ||
162 | * Some changes may require us to change provided interfaces. While we try to | |
163 | implement functions in a generic way so that no future changes are required, | |
164 | we cannot promise a completely stable API. | |
165 | * As we have to keep up with changes in behavior made upstream, we may lag | |
166 | behind in some areas. We usually to document these incompatibilities in our | |
167 | issue tracker with the label "git change". | |
168 | ||
2baee9f8 CMN |
169 | Optional dependencies |
170 | ===================== | |
171 | ||
172 | While the library provides git functionality without the need for | |
173 | dependencies, it can make use of a few libraries to add to it: | |
174 | ||
175 | - pthreads (non-Windows) to enable threadsafe access as well as multi-threaded pack generation | |
176 | - OpenSSL (non-Windows) to talk over HTTPS and provide the SHA-1 functions | |
2c22193b | 177 | - LibSSH2 to enable the SSH transport |
2baee9f8 CMN |
178 | - iconv (OSX) to handle the HFS+ path encoding peculiarities |
179 | ||
ed09e044 CMN |
180 | Initialization |
181 | =============== | |
182 | ||
183 | The library needs to keep track of some global state. Call | |
184 | ||
185 | git_libgit2_init(); | |
186 | ||
187 | before calling any other libgit2 functions. You can call this function many times. A matching number of calls to | |
188 | ||
189 | git_libgit2_shutdown(); | |
190 | ||
ecf1c3c3 ET |
191 | will free the resources. Note that if you have worker threads, you should |
192 | call `git_libgit2_shutdown` *after* those threads have exited. If you | |
193 | require assistance coordinating this, simply have the worker threads call | |
194 | `git_libgit2_init` at startup and `git_libgit2_shutdown` at shutdown. | |
ed09e044 | 195 | |
15bea02c CMN |
196 | Threading |
197 | ========= | |
198 | ||
ac3d33df | 199 | See [threading](docs/threading.md) for information |
15bea02c | 200 | |
1f8cb02f CMN |
201 | Conventions |
202 | =========== | |
203 | ||
ac3d33df | 204 | See [conventions](docs/conventions.md) for an overview of the external |
1f8cb02f CMN |
205 | and internal API/coding conventions we use. |
206 | ||
7548b8af VM |
207 | Building libgit2 - Using CMake |
208 | ============================== | |
ec821ca6 | 209 | |
eae0bfdc PP |
210 | Building |
211 | -------- | |
212 | ||
20b5d300 | 213 | `libgit2` builds cleanly on most platforms without any external dependencies. |
a07d8994 | 214 | Under Unix-like systems, like Linux, \*BSD and Mac OS X, libgit2 expects `pthreads` to be available; |
bbcc7ffc VM |
215 | they should be installed by default on all systems. Under Windows, libgit2 uses the native Windows API |
216 | for threading. | |
217 | ||
1181ca0c | 218 | The `libgit2` library is built using [CMake](<https://cmake.org/>) (version 2.8 or newer) on all platforms. |
4b7483a2 | 219 | |
e0d9e12e | 220 | On most systems you can build the library using the following commands |
4b7483a2 | 221 | |
e0d9e12e VM |
222 | $ mkdir build && cd build |
223 | $ cmake .. | |
224 | $ cmake --build . | |
c5b97d5a | 225 | |
e0d9e12e VM |
226 | Alternatively you can point the CMake GUI tool to the CMakeLists.txt file and generate platform specific build project or IDE workspace. |
227 | ||
c25aa7cd PP |
228 | If you're not familiar with CMake, [a more detailed explanation](https://preshing.com/20170511/how-to-build-a-cmake-based-project/) may be helpful. |
229 | ||
eae0bfdc PP |
230 | Running Tests |
231 | ------------- | |
232 | ||
5c06111b RI |
233 | Once built, you can run the tests from the `build` directory with the command |
234 | ||
eae0bfdc | 235 | $ ctest -V |
5c06111b RI |
236 | |
237 | Alternatively you can run the test suite directly using, | |
238 | ||
e579e0f7 | 239 | $ ./libgit2_tests |
5c06111b | 240 | |
eae0bfdc PP |
241 | Invoking the test suite directly is useful because it allows you to execute |
242 | individual tests, or groups of tests using the `-s` flag. For example, to | |
243 | run the index tests: | |
244 | ||
e579e0f7 | 245 | $ ./libgit2_tests -sindex |
eae0bfdc PP |
246 | |
247 | To run a single test named `index::racy::diff`, which corresponds to the test | |
c25aa7cd | 248 | function [`test_index_racy__diff`](https://github.com/libgit2/libgit2/blob/main/tests/index/racy.c#L23): |
eae0bfdc | 249 | |
e579e0f7 | 250 | $ ./libgit2_tests -sindex::racy::diff |
eae0bfdc PP |
251 | |
252 | The test suite will print a `.` for every passing test, and an `F` for any | |
253 | failing test. An `S` indicates that a test was skipped because it is not | |
254 | applicable to your platform or is particularly expensive. | |
255 | ||
256 | **Note:** There should be _no_ failing tests when you build an unmodified | |
257 | source tree from a [release](https://github.com/libgit2/libgit2/releases), | |
c25aa7cd | 258 | or from the [main branch](https://github.com/libgit2/libgit2/tree/main). |
eae0bfdc PP |
259 | Please contact us or [open an issue](https://github.com/libgit2/libgit2/issues) |
260 | if you see test failures. | |
261 | ||
262 | Installation | |
263 | ------------ | |
264 | ||
e0d9e12e | 265 | To install the library you can specify the install prefix by setting: |
4b7483a2 | 266 | |
e0d9e12e VM |
267 | $ cmake .. -DCMAKE_INSTALL_PREFIX=/install/prefix |
268 | $ cmake --build . --target install | |
4b7483a2 | 269 | |
eae0bfdc PP |
270 | Advanced Usage |
271 | -------------- | |
272 | ||
1181ca0c | 273 | For more advanced use or questions about CMake please read <https://cmake.org/Wiki/CMake_FAQ>. |
c5b97d5a | 274 | |
7548b8af VM |
275 | The following CMake variables are declared: |
276 | ||
22a2d3d5 UG |
277 | - `CMAKE_INSTALL_BINDIR`: Where to install binaries to. |
278 | - `CMAKE_INSTALL_LIBDIR`: Where to install libraries to. | |
279 | - `CMAKE_INSTALL_INCLUDEDIR`: Where to install headers to. | |
f0890fcc | 280 | - `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON) |
e579e0f7 MB |
281 | - `BUILD_TESTS`: Build the unit and integration test suites (defaults to ON) |
282 | - `USE_THREADS`: Build libgit2 with threading support (defaults to ON) | |
ac3d33df JK |
283 | |
284 | To list all build options and their current value, you can do the | |
285 | following: | |
286 | ||
287 | # Create and set up a build directory | |
288 | $ mkdir build | |
289 | $ cmake .. | |
290 | # List all build options and their values | |
291 | $ cmake -L | |
66bf4dbc CMN |
292 | |
293 | Compiler and linker options | |
294 | --------------------------- | |
295 | ||
296 | CMake lets you specify a few variables to control the behavior of the | |
297 | compiler and linker. These flags are rarely used but can be useful for | |
298 | 64-bit to 32-bit cross-compilation. | |
299 | ||
300 | - `CMAKE_C_FLAGS`: Set your own compiler flags | |
301 | - `CMAKE_FIND_ROOT_PATH`: Override the search path for libraries | |
302 | - `ZLIB_LIBRARY`, `OPENSSL_SSL_LIBRARY` AND `OPENSSL_CRYPTO_LIBRARY`: | |
303 | Tell CMake where to find those specific libraries | |
e579e0f7 MB |
304 | - `LINK_WITH_STATIC_LIBRARIES`: Link only with static versions of |
305 | system libraries | |
66bf4dbc CMN |
306 | |
307 | MacOS X | |
308 | ------- | |
309 | ||
310 | If you want to build a universal binary for Mac OS X, CMake sets it | |
311 | all up for you if you use `-DCMAKE_OSX_ARCHITECTURES="i386;x86_64"` | |
312 | when configuring. | |
313 | ||
01cd5ae3 KA |
314 | Android |
315 | ------- | |
316 | ||
317 | Extract toolchain from NDK using, `make-standalone-toolchain.sh` script. | |
63d1fad4 NK |
318 | Optionally, crosscompile and install OpenSSL inside of it. Then create CMake |
319 | toolchain file that configures paths to your crosscompiler (substitute `{PATH}` | |
01cd5ae3 KA |
320 | with full path to the toolchain): |
321 | ||
322 | SET(CMAKE_SYSTEM_NAME Linux) | |
323 | SET(CMAKE_SYSTEM_VERSION Android) | |
775d831b | 324 | |
01cd5ae3 KA |
325 | SET(CMAKE_C_COMPILER {PATH}/bin/arm-linux-androideabi-gcc) |
326 | SET(CMAKE_CXX_COMPILER {PATH}/bin/arm-linux-androideabi-g++) | |
327 | SET(CMAKE_FIND_ROOT_PATH {PATH}/sysroot/) | |
775d831b | 328 | |
01cd5ae3 KA |
329 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
330 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | |
331 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | |
332 | ||
57aa839c | 333 | Add `-DCMAKE_TOOLCHAIN_FILE={pathToToolchainFile}` to cmake command |
01cd5ae3 KA |
334 | when configuring. |
335 | ||
22a2d3d5 UG |
336 | MinGW |
337 | ----- | |
338 | ||
339 | If you want to build the library in MinGW environment with SSH support enabled, | |
340 | you may need to pass `-DCMAKE_LIBRARY_PATH="${MINGW_PREFIX}/${MINGW_CHOST}/lib/"` flag | |
341 | to CMake when configuring. This is because CMake cannot find the Win32 libraries in | |
342 | MinGW folders by default and you might see an error message stating that CMake | |
343 | could not resolve `ws2_32` library during configuration. | |
344 | ||
345 | Another option would be to install `msys2-w32api-runtime` package before configuring. | |
346 | This package installs the Win32 libraries into `/usr/lib` folder which is by default | |
347 | recognized as the library path by CMake. Please note though that this package is meant | |
348 | for MSYS subsystem which is different from MinGW. | |
349 | ||
e0d9e12e VM |
350 | Language Bindings |
351 | ================================== | |
4b7483a2 | 352 | |
e0d9e12e | 353 | Here are the bindings to libgit2 that are currently available: |
4b7483a2 | 354 | |
b8d08292 | 355 | * C++ |
8044ee42 | 356 | * libqgit2, Qt bindings <https://projects.kde.org/projects/playground/libs/libqgit2/repository/> |
0e8144fe EH |
357 | * Chicken Scheme |
358 | * chicken-git <https://wiki.call-cc.org/egg/git> | |
26127ea7 | 359 | * D |
e702dc2e | 360 | * dlibgit <https://github.com/s-ludwig/dlibgit> |
b8d08292 AL |
361 | * Delphi |
362 | * GitForDelphi <https://github.com/libgit2/GitForDelphi> | |
c25aa7cd | 363 | * libgit2-delphi <https://github.com/todaysoftware/libgit2-delphi> |
b8d08292 | 364 | * Erlang |
a402179a | 365 | * Geef <https://github.com/carlosmn/geef> |
b8d08292 | 366 | * Go |
f2cda906 | 367 | * git2go <https://github.com/libgit2/git2go> |
b8d08292 | 368 | * GObject |
1ce509fe | 369 | * libgit2-glib <https://wiki.gnome.org/Projects/Libgit2-glib> |
eae0bfdc PP |
370 | * Guile |
371 | * Guile-Git <https://gitlab.com/guile-git/guile-git> | |
b8d08292 | 372 | * Haskell |
1181ca0c | 373 | * hgit2 <https://github.com/jwiegley/gitlib> |
4ef9a508 ET |
374 | * Java |
375 | * Jagged <https://github.com/ethomson/jagged> | |
c25aa7cd | 376 | * Git24j <https://github.com/git24j/git24j> |
22a2d3d5 UG |
377 | * Javascript / WebAssembly ( browser and nodejs ) |
378 | * WASM-git <https://github.com/petersalomonsen/wasm-git> | |
d747ec18 | 379 | * Julia |
22a2d3d5 | 380 | * LibGit2.jl <https://github.com/JuliaLang/julia/tree/master/stdlib/LibGit2> |
b8d08292 AL |
381 | * Lua |
382 | * luagit2 <https://github.com/libgit2/luagit2> | |
383 | * .NET | |
b8d08292 AL |
384 | * libgit2sharp <https://github.com/libgit2/libgit2sharp> |
385 | * Node.js | |
1181ca0c | 386 | * nodegit <https://github.com/nodegit/nodegit> |
b8d08292 AL |
387 | * Objective-C |
388 | * objective-git <https://github.com/libgit2/objective-git> | |
389 | * OCaml | |
69560cc0 | 390 | * ocaml-libgit2 <https://github.com/fxfactorial/ocaml-libgit2> |
b8d08292 AL |
391 | * Parrot Virtual Machine |
392 | * parrot-libgit2 <https://github.com/letolabs/parrot-libgit2> | |
393 | * Perl | |
2ef20da0 | 394 | * Git-Raw <https://github.com/jacquesg/p5-Git-Raw> |
b8d08292 AL |
395 | * PHP |
396 | * php-git <https://github.com/libgit2/php-git> | |
397 | * Python | |
398 | * pygit2 <https://github.com/libgit2/pygit2> | |
562516ec | 399 | * R |
c25aa7cd | 400 | * gert <https://docs.ropensci.org/gert> |
562516ec | 401 | * git2r <https://github.com/ropensci/git2r> |
b8d08292 AL |
402 | * Ruby |
403 | * Rugged <https://github.com/libgit2/rugged> | |
b4913705 | 404 | * Rust |
22a2d3d5 | 405 | * git2-rs <https://github.com/rust-lang/git2-rs> |
35425b51 | 406 | * Swift |
87faeaec | 407 | * SwiftGit2 <https://github.com/SwiftGit2/SwiftGit2> |
b8d08292 AL |
408 | * Vala |
409 | * libgit2.vapi <https://github.com/apmasell/vapis/blob/master/libgit2.vapi> | |
4b7483a2 SC |
410 | |
411 | If you start another language binding to libgit2, please let us know so | |
412 | we can add it to the list. | |
413 | ||
b8d08292 | 414 | How Can I Contribute? |
c5b97d5a SC |
415 | ================================== |
416 | ||
0820d0c8 ET |
417 | We welcome new contributors! We have a number of issues marked as |
418 | ["up for grabs"](https://github.com/libgit2/libgit2/issues?q=is%3Aissue+is%3Aopen+label%3A%22up+for+grabs%22) | |
419 | and | |
420 | ["easy fix"](https://github.com/libgit2/libgit2/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3A%22easy+fix%22) | |
421 | that are good places to jump in and get started. There's much more detailed | |
ac3d33df | 422 | information in our list of [outstanding projects](docs/projects.md). |
0820d0c8 | 423 | |
ac3d33df JK |
424 | Please be sure to check the [contribution guidelines](docs/contributing.md) to |
425 | understand our workflow, and the libgit2 [coding conventions](docs/conventions.md). | |
c5b97d5a | 426 | |
932d1baf | 427 | License |
4b7483a2 | 428 | ================================== |
486bc366 | 429 | |
18925129 | 430 | `libgit2` is under GPL2 **with linking exception**. This means you can link to |
486bc366 | 431 | and use the library from any program, proprietary or open source; paid or |
69d11971 ET |
432 | gratis. However, if you modify libgit2 itself, you must distribute the |
433 | source to your modified version of libgit2. | |
4b7483a2 | 434 | |
486bc366 | 435 | See the [COPYING file](COPYING) for the full license text. |