tests: move static method to the top
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
diff --git a/tests/refs/reflog/reflog_helpers.c b/tests/refs/reflog/reflog_helpers.c
index 7a1b397..5e36736 100644
--- a/tests/refs/reflog/reflog_helpers.c
+++ b/tests/refs/reflog/reflog_helpers.c
@@ -3,6 +3,18 @@
#include "repository.h"
#include "reflog.h"
+static int reflog_entry_tostr(git_buf *out, const git_reflog_entry *entry)
+{
+ char old_oid[GIT_OID_HEXSZ], new_oid[GIT_OID_HEXSZ];
+
+ assert(out && entry);
+
+ git_oid_tostr((char *)&old_oid, GIT_OID_HEXSZ, git_reflog_entry_id_old(entry));
+ git_oid_tostr((char *)&new_oid, GIT_OID_HEXSZ, git_reflog_entry_id_new(entry));
+
+ return git_buf_printf(out, "%s %s %s %s", old_oid, new_oid, "somesig", git_reflog_entry_message(entry));
+}
+
size_t reflog_entrycount(git_repository *repo, const char *name)
{
git_reflog *log;
@@ -86,18 +98,6 @@ void cl_reflog_check_entry_(git_repository *repo, const char *reflog, size_t idx
git_reflog_free(log);
}
-static int reflog_entry_tostr(git_buf *out, const git_reflog_entry *entry)
-{
- char old_oid[GIT_OID_HEXSZ], new_oid[GIT_OID_HEXSZ];
-
- assert(out && entry);
-
- git_oid_tostr((char *)&old_oid, GIT_OID_HEXSZ, git_reflog_entry_id_old(entry));
- git_oid_tostr((char *)&new_oid, GIT_OID_HEXSZ, git_reflog_entry_id_new(entry));
-
- return git_buf_printf(out, "%s %s %s %s", old_oid, new_oid, "somesig", git_reflog_entry_message(entry));
-}
-
void reflog_print(git_repository *repo, const char *reflog_name)
{
git_reflog *reflog;