mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 13:15:39 +00:00

There was a little bug where the submodule cache thought that the index date was out of date even when it wasn't that was resulting in some extra scans of index data even when not needed. Mostly this commit adds a bunch of new tests including adding and removing submodules in the index and in the HEAD and seeing if we can automatically pick them up when refreshing.
22 lines
901 B
C
22 lines
901 B
C
extern void rewrite_gitmodules(const char *workdir);
|
|
|
|
/* these will automatically set a cleanup callback */
|
|
extern git_repository *setup_fixture_submodules(void);
|
|
extern git_repository *setup_fixture_submod2(void);
|
|
|
|
extern unsigned int get_submodule_status(git_repository *, const char *);
|
|
|
|
extern void assert__submodule_exists(
|
|
git_repository *, const char *, const char *, const char *, int);
|
|
|
|
#define assert_submodule_exists(repo,name) \
|
|
assert__submodule_exists(repo, name, "git_submodule_lookup(" #name ") failed", __FILE__, __LINE__)
|
|
|
|
extern void refute__submodule_exists(
|
|
git_repository *, const char *, int err, const char *, const char *, int);
|
|
|
|
#define refute_submodule_exists(repo,name,code) \
|
|
refute__submodule_exists(repo, name, code, "expected git_submodule_lookup(" #name ") to fail with error " #code, __FILE__, __LINE__)
|
|
|
|
extern void dump_submodules(git_repository *repo);
|