1 libgit2 - the Git linkable library
4 libgit2 is a portable, pure C implementation of the Git core methods provided as a
5 re-entrant linkable library with a solid API, allowing you to write native
6 speed custom Git applications in any language with bindings.
8 libgit2 is licensed under a **very permissive license** (GPLv2 with a special Linking Exception).
9 This basically means that you can link it (unmodified) with any kind of software without having to
10 release its source code.
12 * Mailing list: <libgit2@librelist.org>
13 * Website: <http://libgit2.github.com>
14 * API documentation: <http://libgit2.github.com/libgit2/modules.html>
15 * Usage guide: <http://libgit2.github.com/api.html>
18 ==================================
20 libgit2 is already very usable.
22 * SHA conversions, formatting and shortening
23 * object reading (loose and packed)
24 * object writing (loose)
25 * commit, tag, tree and blob parsing and write-back
28 * index file (staging area) manipulation
30 * reference management (including packed references)
34 Building libgit2 - External dependencies
35 ========================================
37 libgit2 builds cleanly on most platforms without any external dependencies.
38 Under Unix-like systems, like Linux, *BSD and Mac OS X, libgit2 expects `pthreads` to be available;
39 they should be installed by default on all systems. Under Windows, libgit2 uses the native Windows API
42 Additionally, he following libraries may be used as replacement for built-in functionality:
44 * LibSSL **(optional)** <http://www.openssl.org/>
46 libgit2 can be built using the SHA1 implementation of LibSSL-Crypto, instead of the built-in custom implementations. Performance wise, they are quite similar.
48 Building libgit2 - Using waf
49 ======================
51 Waf is a minimalist build system which only requires a Python 2.5+ interpreter to run. This is the default build system for libgit2.
53 To build libgit2 using waf, first configure the build system by running:
57 Then build the library, either in its shared (libgit2.so) or static form (libgit2.a):
62 You can then run the full test suite with:
66 And finally you can install the library with (you may need to sudo):
70 The waf build system for libgit2 accepts the following flags:
73 build the library with debug symbols.
76 --sha1=[builtin|ppc|openssl]
77 use the builtin SHA1 functions, the optimized PPC versions
78 or the SHA1 functions from LibCrypto (OpenSSL).
79 Defaults to 'builtin'.
81 --msvc=[7.1|8.0|9.0|10.0]
82 Force a specific version of the MSVC compiler, if more than
83 one version is installed.
85 --arch=[ia64|x64|x86|x86_amd64|x86_ia64]
86 Force a specific architecture for compilers that support it.
89 Enable sqlite support.
91 You can run `./waf --help` to see a full list of install options and
95 Building libgit2 - Using CMake
96 ==============================
98 The libgit2 library can also be built using CMake 2.6+ (<http://www.cmake.org>) on all platforms.
100 On most systems you can build the library using the following commands
102 $ mkdir build && cd build
106 Alternatively you can point the CMake GUI tool to the CMakeLists.txt file and generate platform specific build project or IDE workspace.
108 To install the library you can specify the install prefix by setting:
110 $ cmake .. -DCMAKE_INSTALL_PREFIX=/install/prefix
111 $ cmake --build . --target install
113 For more advanced use or questions about CMake please read <http://www.cmake.org/Wiki/CMake_FAQ>.
117 ==================================
119 Here are the bindings to libgit2 that are currently available:
121 * Rugged (Ruby bindings) <https://github.com/libgit2/rugged>
122 * objective-git (Objective-C bindings) <https://github.com/libgit2/objective-git>
123 * pygit2 (Python bindings) <https://github.com/libgit2/pygit2>
124 * libgit2sharp (.NET bindings) <https://github.com/libgit2/libgit2sharp>
125 * php-git (PHP bindings) <https://github.com/libgit2/php-git>
126 * luagit2 (Lua bindings) <https://github.com/libgit2/luagit2>
127 * GitForDelphi (Delphi bindings) <https://github.com/libgit2/GitForDelphi>
128 * node-gitteh (Node.js bindings) <https://github.com/libgit2/node-gitteh>
129 * nodegit (Node.js bindings) <https://github.com/tbranyen/nodegit>
130 * go-git (Go bindings) <https://github.com/str1ngs/go-git>
131 * libqgit2 (C++ QT bindings) <https://projects.kde.org/projects/playground/libs/libqgit2/>
132 * libgit2-ocaml (ocaml bindings) <https://github.com/burdges/libgit2-ocaml>
133 * Geef (Erlang bindings) <https://github.com/schacon/geef>
135 If you start another language binding to libgit2, please let us know so
136 we can add it to the list.
139 ==================================
141 Fork libgit2/libgit2 on GitHub, add your improvement, push it to a branch
142 in your fork named for the topic, send a pull request.
144 You can also file bugs or feature requests under the libgit2 project on
145 GitHub, or join us on the mailing list by sending an email to:
147 libgit2@librelist.com
151 ==================================
152 libgit2 is under GPL2 **with linking exemption**. This means you
153 can link to the library with any program, commercial, open source or
154 other. However, you cannot modify libgit2 and distribute it without
155 supplying the source.
157 See the COPYING file for the full license text.