Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-05-16 21:38:27 +0400
committerRussell Belfer <rb@github.com>2013-05-16 21:38:27 +0400
commit58206c9ae79af8ef675e30087e5430065b078bbb (patch)
tree68fa8a68d13a3d4cccf0551f9515b5578ec63f07 /examples/Makefile
parent54e489c21efc19a14eac0f6f83313e3a753688f8 (diff)
Add cat-file example and increase const use in API
This adds an example implementation that emulates git cat-file. It is a convenient and relatively simple example of getting data out of a repository. Implementing this also revealed that there are a number of APIs that are still not using const pointers to objects that really ought to be. The main cause of this is that `git_vector_bsearch` may need to call `git_vector_sort` before doing the search, so a const pointer to the vector is not allowed. However, for tree objects, with a little care, we can ensure that the vector of tree entries is always sorted and allow lookups to take a const pointer. Also, the missing const in commit objects just looks like an oversight.
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 2c18731fd..c5d555566 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -3,7 +3,7 @@
CC = gcc
CFLAGS = -g -I../include -I../src -Wall -Wextra -Wmissing-prototypes -Wno-missing-field-initializers
LFLAGS = -L../build -lgit2 -lz
-APPS = general showindex diff rev-list
+APPS = general showindex diff rev-list cat-file
all: $(APPS)