Option flags for pygit2.init_repository().
| 1023 | |
| 1024 | |
| 1025 | class RepositoryInitFlag(IntFlag): |
| 1026 | """ |
| 1027 | Option flags for pygit2.init_repository(). |
| 1028 | """ |
| 1029 | |
| 1030 | BARE = C.GIT_REPOSITORY_INIT_BARE |
| 1031 | 'Create a bare repository with no working directory.' |
| 1032 | |
| 1033 | NO_REINIT = C.GIT_REPOSITORY_INIT_NO_REINIT |
| 1034 | 'Raise GitError if the path appears to already be a git repository.' |
| 1035 | |
| 1036 | NO_DOTGIT_DIR = C.GIT_REPOSITORY_INIT_NO_DOTGIT_DIR |
| 1037 | """Normally a "/.git/" will be appended to the repo path for |
| 1038 | non-bare repos (if it is not already there), but passing this flag |
| 1039 | prevents that behavior.""" |
| 1040 | |
| 1041 | MKDIR = C.GIT_REPOSITORY_INIT_MKDIR |
| 1042 | """Make the repo_path (and workdir_path) as needed. Init is always willing |
| 1043 | to create the ".git" directory even without this flag. This flag tells |
| 1044 | init to create the trailing component of the repo and workdir paths |
| 1045 | as needed.""" |
| 1046 | |
| 1047 | MKPATH = C.GIT_REPOSITORY_INIT_MKPATH |
| 1048 | 'Recursively make all components of the repo and workdir paths as necessary.' |
| 1049 | |
| 1050 | EXTERNAL_TEMPLATE = C.GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE |
| 1051 | """libgit2 normally uses internal templates to initialize a new repo. |
| 1052 | This flags enables external templates, looking at the "template_path" from |
| 1053 | the options if set, or the `init.templatedir` global config if not, |
| 1054 | or falling back on "/usr/share/git-core/templates" if it exists.""" |
| 1055 | |
| 1056 | RELATIVE_GITLINK = C.GIT_REPOSITORY_INIT_RELATIVE_GITLINK |
| 1057 | """If an alternate workdir is specified, use relative paths for the gitdir |
| 1058 | and core.worktree.""" |
| 1059 | |
| 1060 | |
| 1061 | class RepositoryInitMode(IntEnum): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…