Commit ebe5d8ec by Etienne Samson

tests: move static method to the top

parent f01a8587
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment