7 * Path to the git directory.
8 * Cannot be NULL after initialization.
13 * Path to the common git directory.
14 * Cannot be NULL after initialization.
19 * Path to the repository's object store.
20 * Cannot be NULL after initialization.
25 * Path to the repository's graft file.
26 * Cannot be NULL after initialization.
31 * Path to the current worktree's index file.
32 * Cannot be NULL after initialization.
37 * Path to the working directory.
38 * A NULL value indicates that there is no working directory.
44 * Bit used during initialization to indicate if repository state (like
45 * the location of the 'objectdir') should be read from the
46 * environment. By default this bit will be set at the begining of
47 * 'repo_init()' so that all repositories will ignore the environment.
48 * The exception to this is 'the_repository', which doesn't go through
49 * the normal 'repo_init()' process.
51 unsigned ignore_env
:1;
53 /* Indicate if a repository has a different 'commondir' from 'gitdir' */
54 unsigned different_commondir
:1;
57 extern struct repository
*the_repository
;
59 extern void repo_set_gitdir(struct repository
*repo
, const char *path
);
60 extern void repo_set_worktree(struct repository
*repo
, const char *path
);
61 extern int repo_init(struct repository
*repo
, const char *gitdir
, const char *worktree
);
62 extern void repo_clear(struct repository
*repo
);
64 #endif /* REPOSITORY_H */