Commit 44908fe7 by Vicent Marti

Change the library include file

Libgit2 is now officially include as

	#include "<git2.h>"

or indidividual files may be included as

	#include <git2/index.h>

Signed-off-by: Vicent Marti <tanoku@gmail.com>
parent d12299fe
......@@ -23,9 +23,9 @@
* Boston, MA 02110-1301, USA.
*/
#include "git/common.h"
#include "git/object.h"
#include "git/repository.h"
#include "git2/common.h"
#include "git2/object.h"
#include "git2/repository.h"
#include "common.h"
#include "blob.h"
......
#ifndef INCLUDE_blob_h__
#define INCLUDE_blob_h__
#include "git/blob.h"
#include "git2/blob.h"
#include "repository.h"
#include "fileops.h"
......
......@@ -23,9 +23,9 @@
* Boston, MA 02110-1301, USA.
*/
#include "git/common.h"
#include "git/object.h"
#include "git/repository.h"
#include "git2/common.h"
#include "git2/object.h"
#include "git2/repository.h"
#include "common.h"
#include "commit.h"
......
#ifndef INCLUDE_commit_h__
#define INCLUDE_commit_h__
#include "git/commit.h"
#include "git2/commit.h"
#include "tree.h"
#include "repository.h"
#include "vector.h"
......
......@@ -8,7 +8,7 @@
#define GIT_WIN32 1
#endif
#include "git/thread-utils.h"
#include "git2/thread-utils.h"
#include "cc-compat.h"
#ifdef GIT_HAS_PTHREAD
......@@ -46,7 +46,7 @@ typedef SSIZE_T ssize_t;
#endif
#include "git/common.h"
#include "git2/common.h"
#include "util.h"
#include "thread-utils.h"
#include "errors.h"
......
#include "common.h"
#include "git/odb.h"
#include "git2/odb.h"
#include "delta-apply.h"
/*
......
#ifndef INCLUDE_errors_h__
#define INCLUDE_errors_h__
#include "git/errors.h"
#include "git2/errors.h"
/* convenience functions */
GIT_INLINE(int) git_int_error(int code)
......
......@@ -26,24 +26,24 @@
#ifndef INCLUDE_git_git_h__
#define INCLUDE_git_git_h__
#include "git/common.h"
#include "git/errors.h"
#include "git/zlib.h"
#include "git2/common.h"
#include "git2/errors.h"
#include "git2/zlib.h"
#include "git/types.h"
#include "git2/types.h"
#include "git/oid.h"
#include "git/odb.h"
#include "git2/oid.h"
#include "git2/odb.h"
#include "git/repository.h"
#include "git/revwalk.h"
#include "git2/repository.h"
#include "git2/revwalk.h"
#include "git/object.h"
#include "git/blob.h"
#include "git/commit.h"
#include "git/tag.h"
#include "git/tree.h"
#include "git2/object.h"
#include "git2/blob.h"
#include "git2/commit.h"
#include "git2/tag.h"
#include "git2/tree.h"
#include "git/index.h"
#include "git2/index.h"
#endif
......@@ -4,7 +4,7 @@
#ifndef INCLUDE_hash_h__
#define INCLUDE_hash_h__
#include "git/oid.h"
#include "git2/oid.h"
typedef struct git_hash_ctx git_hash_ctx;
......
#ifndef INCLUDE_hashtable_h__
#define INCLUDE_hashtable_h__
#include "git/common.h"
#include "git/oid.h"
#include "git/odb.h"
#include "git2/common.h"
#include "git2/oid.h"
#include "git2/odb.h"
typedef uint32_t (*git_hash_ptr)(const void *);
......
......@@ -29,8 +29,8 @@
#include "repository.h"
#include "index.h"
#include "hash.h"
#include "git/odb.h"
#include "git/blob.h"
#include "git2/odb.h"
#include "git2/blob.h"
#define entry_padding(type, len) (8 - ((offsetof(type, path) + (len)) & 0x7))
#define short_entry_padding(len) entry_padding(struct entry_short, len)
......
......@@ -4,8 +4,8 @@
#include "fileops.h"
#include "filelock.h"
#include "vector.h"
#include "git/odb.h"
#include "git/index.h"
#include "git2/odb.h"
#include "git2/index.h"
struct git_index_tree {
char *name;
......
......@@ -24,14 +24,14 @@
*/
#include "common.h"
#include "git/zlib.h"
#include "git/object.h"
#include "git2/zlib.h"
#include "git2/object.h"
#include "fileops.h"
#include "hash.h"
#include "odb.h"
#include "delta-apply.h"
#include "git/odb_backend.h"
#include "git2/odb_backend.h"
static int format_object_header(char *hdr, size_t n, git_rawobj *obj)
{
......
#ifndef INCLUDE_odb_h__
#define INCLUDE_odb_h__
#include <git/odb.h>
#include <git/oid.h>
#include "git2/odb.h"
#include "git2/oid.h"
#include "vector.h"
......
......@@ -24,14 +24,14 @@
*/
#include "common.h"
#include "git/zlib.h"
#include "git/object.h"
#include "git2/zlib.h"
#include "git2/object.h"
#include "fileops.h"
#include "hash.h"
#include "odb.h"
#include "delta-apply.h"
#include "git/odb_backend.h"
#include "git2/odb_backend.h"
typedef struct { /* object header data */
git_otype type; /* object type */
......
......@@ -24,14 +24,14 @@
*/
#include "common.h"
#include "git/zlib.h"
#include "git/repository.h"
#include "git2/zlib.h"
#include "git2/repository.h"
#include "fileops.h"
#include "hash.h"
#include "odb.h"
#include "delta-apply.h"
#include "git/odb_backend.h"
#include "git2/odb_backend.h"
/** First 4 bytes of a pack-*.idx file header.
*
......
......@@ -24,7 +24,7 @@
*/
#include "common.h"
#include "git/oid.h"
#include "git2/oid.h"
#include "repository.h"
#include <string.h>
......
......@@ -26,7 +26,7 @@
#include "common.h"
#include "person.h"
#include "repository.h"
#include "git/common.h"
#include "git2/common.h"
void git_person__free(git_person *person)
{
......
#ifndef INCLUDE_person_h__
#define INCLUDE_person_h__
#include "git/common.h"
#include "git2/common.h"
#include "repository.h"
#include <time.h>
......
......@@ -24,7 +24,7 @@
*/
#include <stdarg.h>
#include "git/object.h"
#include "git2/object.h"
#include "common.h"
#include "repository.h"
......
#ifndef INCLUDE_repository_h__
#define INCLUDE_repository_h__
#include "git/common.h"
#include "git/oid.h"
#include "git/odb.h"
#include "git/repository.h"
#include "git2/common.h"
#include "git2/oid.h"
#include "git2/odb.h"
#include "git2/repository.h"
#include "hashtable.h"
#include "index.h"
......
#ifndef INCLUDE_revwalk_h__
#define INCLUDE_revwalk_h__
#include "git/common.h"
#include "git/revwalk.h"
#include "git2/common.h"
#include "git2/revwalk.h"
#include "commit.h"
#include "repository.h"
......
......@@ -28,8 +28,8 @@
#include "tag.h"
#include "person.h"
#include "revwalk.h"
#include "git/object.h"
#include "git/repository.h"
#include "git2/object.h"
#include "git2/repository.h"
void git_tag__free(git_tag *tag)
{
......
#ifndef INCLUDE_tag_h__
#define INCLUDE_tag_h__
#include "git/tag.h"
#include "git2/tag.h"
#include "repository.h"
struct git_tag {
......
......@@ -27,8 +27,8 @@
#include "commit.h"
#include "revwalk.h"
#include "tree.h"
#include "git/repository.h"
#include "git/object.h"
#include "git2/repository.h"
#include "git2/object.h"
int entry_search_cmp(const void *key, const void *array_member)
{
......
#ifndef INCLUDE_tree_h__
#define INCLUDE_tree_h__
#include <git/tree.h>
#include "git2/tree.h"
#include "repository.h"
#include "vector.h"
......
#ifndef INCLUDE_vector_h__
#define INCLUDE_vector_h__
#include "git/common.h"
#include "git2/common.h"
typedef int (*git_vector_cmp)(const void *, const void *);
......
#include "test_lib.h"
#include "hash.h"
#include <git/oid.h>
#include <git2/oid.h>
static char *hello_id = "22596363b3de40b06f981fb85d82312e8c0ed511";
static char *hello_text = "hello world\n";
......
#include "test_lib.h"
#include <git/oid.h>
#include <git2/oid.h>
BEGIN_TEST(oid_szs)
git_oid out;
......
#include "test_lib.h"
#include <git/odb.h>
#include <git/object.h>
#include <git2/odb.h>
#include <git2/object.h>
BEGIN_TEST(type_to_string)
must_be_true(!strcmp(git_object_type2string(GIT_OBJ_BAD), ""));
......
#include "test_lib.h"
#include <git/odb.h>
#include <git2/odb.h>
static char *commit_id = "3d7f8a6af076c8c3f20071a8935cdbe8228594d1";
......
#include "test_lib.h"
#include "test_helpers.h"
#include <git/odb.h>
#include <git2/odb.h>
static char *odb_dir = "test-objects";
......
#include "test_lib.h"
#include "test_helpers.h"
#include <git/odb.h>
#include <git2/odb.h>
/*
* read loose objects from the object directory. The objects are
......
#include "test_lib.h"
#include "test_helpers.h"
#include <git/odb.h>
#include <git2/odb.h>
/*
* read loose objects from the object directory. The objects are
......
#include "test_lib.h"
#include "test_helpers.h"
#include <git/odb.h>
#include <git2/odb.h>
static const char *packed_objects[] = {
"0266163a49e280c4f5ed1e08facd36a2bd716bcf",
......
#include "test_lib.h"
#include "test_helpers.h"
#include <git/odb.h>
#include <git2/odb.h>
static const char *packed_objects[] = {
"0266163a49e280c4f5ed1e08facd36a2bd716bcf",
......
#include "test_lib.h"
#include <git/odb.h>
#include <git2/odb.h>
#include "fileops.h"
static char *odb_dir = "test-objects";
......
......@@ -2,9 +2,9 @@
#include "test_helpers.h"
#include "commit.h"
#include "person.h"
#include <git/odb.h>
#include <git/commit.h>
#include <git/revwalk.h>
#include <git2/odb.h>
#include <git2/commit.h>
#include <git2/revwalk.h>
static char *test_commits_broken[] = {
......
......@@ -3,9 +3,9 @@
#include "commit.h"
#include "person.h"
#include <git/odb.h>
#include <git/commit.h>
#include <git/revwalk.h>
#include <git2/odb.h>
#include <git2/commit.h>
#include <git2/revwalk.h>
static const char *commit_ids[] = {
"a4a7dce85cf63874e984719f4fdd239f5145052f", /* 0 */
......
......@@ -3,9 +3,9 @@
#include "commit.h"
#include "person.h"
#include <git/odb.h>
#include <git/commit.h>
#include <git/revwalk.h>
#include <git2/odb.h>
#include <git2/commit.h>
#include <git2/revwalk.h>
static const char *commit_ids[] = {
"a4a7dce85cf63874e984719f4fdd239f5145052f", /* 0 */
......
......@@ -2,9 +2,9 @@
#include "test_helpers.h"
#include "commit.h"
#include <git/odb.h>
#include <git/commit.h>
#include <git/revwalk.h>
#include <git2/odb.h>
#include <git2/commit.h>
#include <git2/revwalk.h>
/*
$ git log --oneline --graph --decorate
......
......@@ -2,8 +2,8 @@
#include "test_helpers.h"
#include "commit.h"
#include "revwalk.h"
#include <git/odb.h>
#include <git/commit.h>
#include <git2/odb.h>
#include <git2/commit.h>
BEGIN_TEST(list_timesort_test)
......
......@@ -2,8 +2,8 @@
#include "test_helpers.h"
#include "index.h"
#include <git/odb.h>
#include <git/index.h>
#include <git2/odb.h>
#include <git2/index.h>
#define TEST_INDEX_PATH "../resources/testrepo.git/index"
#define TEST_INDEX2_PATH "../resources/gitgit.index"
......
......@@ -2,8 +2,8 @@
#include "test_helpers.h"
#include "index.h"
#include <git/odb.h>
#include <git/index.h>
#include <git2/odb.h>
#include <git2/index.h>
#define TEST_INDEX_PATH "../resources/testrepo.git/index"
......
......@@ -2,8 +2,8 @@
#include "test_helpers.h"
#include "index.h"
#include <git/odb.h>
#include <git/index.h>
#include <git2/odb.h>
#include <git2/index.h>
#define TEST_INDEX_PATH "../t0600-objects/index"
......
......@@ -2,9 +2,9 @@
#include "test_helpers.h"
#include "commit.h"
#include <git/odb.h>
#include <git/commit.h>
#include <git/tag.h>
#include <git2/odb.h>
#include <git2/commit.h>
#include <git2/tag.h>
static const char *tag1_id = "b25fa35b38051e4ae45d4222e795f9df2e43f1d1";
static const char *tag2_id = "7b4384978d2493e851f9cca7858815fac9b10980";
......
......@@ -2,9 +2,9 @@
#include "test_helpers.h"
#include "commit.h"
#include <git/odb.h>
#include <git/tag.h>
#include <git/revwalk.h>
#include <git2/odb.h>
#include <git2/tag.h>
#include <git2/revwalk.h>
static const char *tag_id = "b25fa35b38051e4ae45d4222e795f9df2e43f1d1";
......
......@@ -2,9 +2,9 @@
#include "test_helpers.h"
#include "commit.h"
#include <git/odb.h>
#include <git/commit.h>
#include <git/revwalk.h>
#include <git2/odb.h>
#include <git2/commit.h>
#include <git2/revwalk.h>
static const char *tree_oid = "1810dff58d8a660512d4832e740f692884338ccd";
......
......@@ -2,9 +2,9 @@
#include "test_helpers.h"
#include "commit.h"
#include <git/odb.h>
#include <git/commit.h>
#include <git/revwalk.h>
#include <git2/odb.h>
#include <git2/commit.h>
#include <git2/revwalk.h>
static const char *tree_oid = "1810dff58d8a660512d4832e740f692884338ccd";
......
......@@ -27,7 +27,7 @@
#define INCLUDE_test_helpers_h__
#include "test_lib.h"
#include <git.h>
#include <git2.h>
#define ODB_FOLDER "../resources/testrepo.git/objects/"
#define REPOSITORY_FOLDER "../resources/testrepo.git/"
......
......@@ -24,7 +24,7 @@
*/
#include "common.h"
#include <git/common.h>
#include <git2/common.h>
#include <stdio.h>
#include <stdlib.h>
......
......@@ -131,8 +131,8 @@ def build_library(bld, lib_str):
)
# Install headers
bld.install_files('${PREFIX}/include', directory.find_node('src/git.h'))
bld.install_files('${PREFIX}/include/git', directory.ant_glob('src/git/*.h'))
bld.install_files('${PREFIX}/include', directory.find_node('src/git2.h'))
bld.install_files('${PREFIX}/include/git2', directory.ant_glob('src/git2/*.h'))
def grep_test_header(text, test_file):
return '\n'.join(l for l in test_file.read().splitlines() if text in l)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment