summaryrefslogtreecommitdiff
path: root/tests/reset/reset_helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reset/reset_helpers.c')
-rw-r--r--tests/reset/reset_helpers.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/reset/reset_helpers.c b/tests/reset/reset_helpers.c
new file mode 100644
index 000000000..17edca4e9
--- /dev/null
+++ b/tests/reset/reset_helpers.c
@@ -0,0 +1,10 @@
+#include "clar_libgit2.h"
+#include "reset_helpers.h"
+
+void retrieve_target_from_oid(git_object **object_out, git_repository *repo, const char *sha)
+{
+ git_oid oid;
+
+ cl_git_pass(git_oid_fromstr(&oid, sha));
+ cl_git_pass(git_object_lookup(object_out, repo, &oid, GIT_OBJ_ANY));
+}