summaryrefslogtreecommitdiff
path: root/src/repository.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-07-26 16:07:01 -0700
committerRussell Belfer <rb@github.com>2012-08-22 16:06:22 -0700
commit662880ca60e4d1662bb10648522242ac54797720 (patch)
tree8076f921e5a02c540f2ccf3358715be985c6f392 /src/repository.h
parent5fdc41e76591aebdbae3b49440bc2c8b2430718c (diff)
downloadlibgit2-662880ca60e4d1662bb10648522242ac54797720.tar.gz
Add git_repository_init_ext for power initters
The extended version of repository init adds support for many of the things that you can do with `git init` and sets up structures that will make it easier to extend further in the future.
Diffstat (limited to 'src/repository.h')
-rw-r--r--src/repository.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/repository.h b/src/repository.h
index 4e03e632b..dd42c63e1 100644
--- a/src/repository.h
+++ b/src/repository.h
@@ -68,6 +68,14 @@ typedef enum {
GIT_EOL_DEFAULT = GIT_EOL_NATIVE
} git_cvar_value;
+/* internal repository init flags */
+enum {
+ GIT_REPOSITORY_INIT__HAS_DOTGIT = (1u << 16),
+ GIT_REPOSITORY_INIT__NATURAL_WD = (1u << 17),
+ GIT_REPOSITORY_INIT__IS_REINIT = (1u << 18),
+};
+
+
/** Base git object for inheritance */
struct git_object {
git_cached_obj cached;
@@ -75,6 +83,7 @@ struct git_object {
git_otype type;
};
+/** Internal structure for repository object */
struct git_repository {
git_odb *_odb;
git_config *_config;
@@ -94,8 +103,7 @@ struct git_repository {
git_cvar_value cvar_cache[GIT_CVAR_CACHE_MAX];
};
-/* fully free the object; internal method, do not
- * export */
+/* fully free the object; internal method, DO NOT EXPORT */
void git_object__free(void *object);
GIT_INLINE(int) git_object__dup(git_object **dest, git_object *source)