Skip to content

Commit ebe5d8e

Browse files
committed
tests: move static method to the top
1 parent f01a858 commit ebe5d8e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/refs/reflog/reflog_helpers.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
#include "repository.h"
44
#include "reflog.h"
55

6+
static int reflog_entry_tostr(git_buf *out, const git_reflog_entry *entry)
7+
{
8+
char old_oid[GIT_OID_HEXSZ], new_oid[GIT_OID_HEXSZ];
9+
10+
assert(out && entry);
11+
12+
git_oid_tostr((char *)&old_oid, GIT_OID_HEXSZ, git_reflog_entry_id_old(entry));
13+
git_oid_tostr((char *)&new_oid, GIT_OID_HEXSZ, git_reflog_entry_id_new(entry));
14+
15+
return git_buf_printf(out, "%s %s %s %s", old_oid, new_oid, "somesig", git_reflog_entry_message(entry));
16+
}
17+
618
size_t reflog_entrycount(git_repository *repo, const char *name)
719
{
820
git_reflog *log;
@@ -86,18 +98,6 @@ void cl_reflog_check_entry_(git_repository *repo, const char *reflog, size_t idx
8698
git_reflog_free(log);
8799
}
88100

89-
static int reflog_entry_tostr(git_buf *out, const git_reflog_entry *entry)
90-
{
91-
char old_oid[GIT_OID_HEXSZ], new_oid[GIT_OID_HEXSZ];
92-
93-
assert(out && entry);
94-
95-
git_oid_tostr((char *)&old_oid, GIT_OID_HEXSZ, git_reflog_entry_id_old(entry));
96-
git_oid_tostr((char *)&new_oid, GIT_OID_HEXSZ, git_reflog_entry_id_new(entry));
97-
98-
return git_buf_printf(out, "%s %s %s %s", old_oid, new_oid, "somesig", git_reflog_entry_message(entry));
99-
}
100-
101101
void reflog_print(git_repository *repo, const char *reflog_name)
102102
{
103103
git_reflog *reflog;

0 commit comments

Comments
 (0)