diff options
| author | Russell Belfer <rb@github.com> | 2013-09-05 15:06:42 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-09-17 09:31:46 -0700 |
| commit | 155fa2342d838bdb2aa873c95a42e091351bb69a (patch) | |
| tree | 4441514a2ad0b4cb2c0e088e03864b9d9f7acbe6 /tests-clar/clar_libgit2.h | |
| parent | 13f36ffb9e1c4fb70b44a477d716873fecfc0407 (diff) | |
| download | libgit2-155fa2342d838bdb2aa873c95a42e091351bb69a.tar.gz | |
Add clar helper to create new commit from index
There were a lot of places in the test code base that were creating
a commit from the index on the current branch. This just adds a
helper to handle that case pretty easily. There was only one test
where this change ended up tweaking the test data, so pretty easy
and mostly just a cleanup.
Diffstat (limited to 'tests-clar/clar_libgit2.h')
| -rw-r--r-- | tests-clar/clar_libgit2.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests-clar/clar_libgit2.h b/tests-clar/clar_libgit2.h index 76299e4e3..f2d9c4d0b 100644 --- a/tests-clar/clar_libgit2.h +++ b/tests-clar/clar_libgit2.h @@ -98,6 +98,14 @@ const char* cl_git_path_url(const char *path); /* Test repository cleaner */ int cl_git_remove_placeholders(const char *directory_path, const char *filename); +/* commit creation helpers */ +void cl_repo_commit_from_index( + git_oid *out, + git_repository *repo, + git_signature *sig, + git_time_t time, + const char *msg); + /* config setting helpers */ void cl_repo_set_bool(git_repository *repo, const char *cfg, int value); int cl_repo_get_bool(git_repository *repo, const char *cfg); |
