libgit2/examples
Carlos Martín Nieto 359dce726d remote: make _ls return the list directly
The callback-based method of listing remote references dates back to the
beginning of the network code's lifetime, when we didn't know any
better.

We need to keep the list around for update_tips() after disconnect() so
let's make use of this to simply give the user a pointer to the array so
they can write straightforward code instead of having to go through a
callback.
2013-11-11 15:35:51 +01:00
..
network remote: make _ls return the list directly 2013-11-11 15:35:51 +01:00
test examples: a test, for rev-list 2013-04-06 20:51:16 -07:00
.gitignore examples: rev-list 2013-04-06 20:51:16 -07:00
add.c add.c: proper frontmatter 2013-10-30 07:21:12 -07:00
cat-file.c Fix typos 2013-11-01 05:39:21 -07:00
CMakeLists.txt Extract common example helpers and reorg examples 2013-10-29 18:30:49 -07:00
common.c Extract common example helpers and reorg examples 2013-10-29 18:30:49 -07:00
common.h Extract common example helpers and reorg examples 2013-10-29 18:30:49 -07:00
diff.c A few formatting changes for rocco 2013-11-01 09:08:22 +01:00
general.c refs: remove the OID/SYMBOLIC filtering 2013-05-11 11:20:38 +02:00
init.c Format comments for use with docco 2013-10-31 14:35:32 -07:00
log.c Merge pull request #1916 from libgit2/simplify-examples 2013-11-01 09:38:34 -07:00
Makefile Extract common example helpers and reorg examples 2013-10-29 18:30:49 -07:00
README.md Update examples/README.md 2013-10-31 14:48:41 -07:00
rev-list.c rev-list.c example: use common utils, reorganize 2013-10-30 12:34:03 -07:00
rev-parse.c Format comments for use with docco 2013-10-31 14:35:32 -07:00
showindex.c Clean up showindex sample 2013-10-30 13:20:08 -07:00
status.c Format comments for use with docco 2013-10-31 14:35:32 -07: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.

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

http://libgit2.github.com/libgit2

such as:

http://libgit2.github.com/libgit2/ex/HEAD/general.html