Files
libgit2/examples
Alf Henrik Sauge f6508bc525 Add option to filter revwalk based on pathspec
This is required in order to later on accelerate the walk by using bloom filters
2026-06-06 11:00:26 +02:00
..
2024-10-18 10:02:02 +01:00
2013-11-01 10:51:12 -07:00
2024-10-19 23:42:26 +01:00
2024-06-13 15:20:40 +02:00
2021-06-02 16:36:17 +02:00
2024-03-01 14:45:08 +01:00
2026-05-22 14:16:15 +01:00

libgit2 examples

These examples are a mixture of basic emulation of core Git command line functions and simple snippets demonstrating libgit2 API usage (for use with Docurium). As a whole, they are not vetted carefully for bugs, error handling, and cross-platform compatibility in the same manner as the rest of the code in libgit2, so copy with caution.

That being said, you are welcome to copy code from these examples as desired when using libgit2. They have been released to the public domain, so there are no restrictions on their use.

For annotated HTML versions, see the "Examples" section of:

https://libgit2.org/libgit2

such as:

https://libgit2.org/libgit2/ex/HEAD/general.html