]> git.proxmox.com Git - libgit2.git/blob - tests/submodule/submodule_helpers.h
New upstream version 1.4.3+dfsg.1
[libgit2.git] / tests / submodule / submodule_helpers.h
1 extern void rewrite_gitmodules(const char *workdir);
2
3 /* these will automatically set a cleanup callback */
4 extern git_repository *setup_fixture_submodules(void);
5 extern git_repository *setup_fixture_submod2(void);
6 extern git_repository *setup_fixture_submod3(void);
7 extern git_repository *setup_fixture_submodule_simple(void);
8 extern git_repository *setup_fixture_super(void);
9 extern git_repository *setup_fixture_submodule_with_path(void);
10
11 extern unsigned int get_submodule_status(git_repository *, const char *);
12
13 extern void assert__submodule_exists(git_repository *, const char *,
14 const char *, const char *, const char *, int);
15
16 #define assert_submodule_exists(repo,name) \
17 assert__submodule_exists(repo, name, "git_submodule_lookup(" #name ") failed", __FILE__, __func__, __LINE__)
18
19 extern void refute__submodule_exists(git_repository *, const char *,
20 int err, const char *, const char *, const char *, int);
21
22 #define refute_submodule_exists(repo,name,code) \
23 refute__submodule_exists(repo, name, code, "expected git_submodule_lookup(" #name ") to fail with error " #code, __FILE__, __func__, __LINE__)
24
25 extern void dump_submodules(git_repository *repo);