libgit2/examples
Russell Belfer 37f9e40939 Some tests with ident and crlf filters
Fixed the filter order to match core Git, too.

This test demonstrates an interesting behavior of core Git (which
is totally reasonable and which libgit2 matches, although mostly
by coincidence).  If you use the ident filter and commit a file
with a garbage ident in it, like '$Id: this is just garbage$' and
then immediately do a 'git checkout-index' with the new file, Git
will not consider the file out of date and will not overwrite the
file with an updated $Id$.  Libgit2 has the same behavior.  If you
remove the file and then do a checkout-index, it will be replaced
with a filtered version that has injected the OID correctly.
2013-09-17 09:31:46 -07:00
..
network Adding credentials callback to ls-remote and fetch too. 2013-09-01 19:00:16 +02: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 Make work if built with threading enabled 2013-09-09 11:07:17 -07:00
cat-file.c Add cat-file example and increase const use in API 2013-05-16 10:38:27 -07:00
CMakeLists.txt Split examples CMakeLists.txt 2013-09-03 15:20:16 -07:00
diff.c Extend diff example 2013-05-17 17:33:03 -07:00
general.c refs: remove the OID/SYMBOLIC filtering 2013-05-11 11:20:38 +02:00
init.c Improve isolation of new test from user environs 2013-08-16 15:04:15 -07:00
log.c Fix -n bug; default to all ancestors 2013-07-27 05:34:49 +10:00
Makefile Add example like "git init" 2013-08-16 15:04:15 -07:00
README.md Updating language in examples README 2012-07-10 21:50:36 -07:00
rev-list.c Fix trailing whitespaces 2013-05-15 22:41:30 +02:00
rev-parse.c rev-parse example 2013-07-10 20:50:32 +02:00
showindex.c Some tests with ident and crlf filters 2013-09-17 09:31:46 -07:00
status.c No such thing as an orphan branch 2013-09-17 09:50:30 +02:00

libgit2 examples

These examples are meant as thin, easy-to-read snippets for Docurium (https://github.com/github/docurium) rather than full-blown implementations of Git commands. They are not vetted as carefully for bugs, error handling, or cross-platform compatibility as the rest of the code in libgit2, so copy with some caution.

For HTML versions, check "Examples" at http://libgit2.github.com/libgit2