forked from libgit2/pygit2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepository.h
More file actions
59 lines (49 loc) · 1.75 KB
/
repository.h
File metadata and controls
59 lines (49 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#define GIT_REPOSITORY_INIT_OPTIONS_VERSION ...
void git_repository_free(git_repository *repo);
int git_repository_state_cleanup(git_repository *repo);
int git_repository_config(git_config **out, git_repository *repo);
int git_repository_config_snapshot(git_config **out, git_repository *repo);
typedef enum {
GIT_REPOSITORY_INIT_BARE = 1,
GIT_REPOSITORY_INIT_NO_REINIT = 2,
GIT_REPOSITORY_INIT_NO_DOTGIT_DIR = 4,
GIT_REPOSITORY_INIT_MKDIR = 8,
GIT_REPOSITORY_INIT_MKPATH = 16,
GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE = 32,
GIT_REPOSITORY_INIT_RELATIVE_GITLINK = 64,
} git_repository_init_flag_t;
typedef enum {
GIT_REPOSITORY_INIT_SHARED_UMASK = 0,
GIT_REPOSITORY_INIT_SHARED_GROUP = 0002775,
GIT_REPOSITORY_INIT_SHARED_ALL = 0002777,
} git_repository_init_mode_t;
typedef struct {
unsigned int version;
uint32_t flags;
uint32_t mode;
const char *workdir_path;
const char *description;
const char *template_path;
const char *initial_head;
const char *origin_url;
} git_repository_init_options;
int git_repository_init_init_options(
git_repository_init_options *opts,
unsigned int version);
int git_repository_init(
git_repository **out,
const char *path,
unsigned is_bare);
int git_repository_init_ext(
git_repository **out,
const char *repo_path,
git_repository_init_options *opts);
int git_repository_set_head(
git_repository* repo,
const char* refname);
int git_repository_set_head_detached(
git_repository* repo,
const git_oid* commitish);
int git_repository_ident(const char **name, const char **email, const git_repository *repo);
int git_repository_set_ident(git_repository *repo, const char *name, const char *email);
int git_repository_index(git_index **out, git_repository *repo);