summaryrefslogtreecommitdiff
path: root/src/reflog.c
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-11-18 21:38:08 -0700
committerBen Straub <bs@github.com>2012-11-27 13:17:45 -0800
commit2508cc66eb91597b12dc19721d9cea1f06e72107 (patch)
tree89e0ec2a924d9dc6b66461f462afbb999045ad27 /src/reflog.c
parent469827812f95e979e3c6468567b2c9ed138a9849 (diff)
downloadlibgit2-2508cc66eb91597b12dc19721d9cea1f06e72107.tar.gz
Rename ref and reflog apis for consistency
Diffstat (limited to 'src/reflog.c')
-rw-r--r--src/reflog.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/reflog.c b/src/reflog.c
index 7b07c6a9f..72a34f695 100644
--- a/src/reflog.c
+++ b/src/reflog.c
@@ -10,7 +10,7 @@
#include "filebuf.h"
#include "signature.h"
-static int reflog_init(git_reflog **reflog, git_reference *ref)
+static int reflog_init(git_reflog **reflog, const git_reference *ref)
{
git_reflog *log;
@@ -180,7 +180,7 @@ void git_reflog_free(git_reflog *reflog)
git__free(reflog);
}
-static int retrieve_reflog_path(git_buf *path, git_reference *ref)
+static int retrieve_reflog_path(git_buf *path, const git_reference *ref)
{
return git_buf_join_n(path, '/', 3,
git_reference_owner(ref)->path_repository, GIT_REFLOG_DIR, ref->name);
@@ -201,7 +201,7 @@ static int create_new_reflog_file(const char *filepath)
return p_close(fd);
}
-int git_reflog_read(git_reflog **reflog, git_reference *ref)
+int git_reflog_read(git_reflog **reflog, const git_reference *ref)
{
int error = -1;
git_buf log_path = GIT_BUF_INIT;
@@ -405,10 +405,10 @@ int git_reflog_delete(git_reference *ref)
return error;
}
-unsigned int git_reflog_entrycount(git_reflog *reflog)
+size_t git_reflog_entrycount(git_reflog *reflog)
{
assert(reflog);
- return (unsigned int)reflog->entries.length;
+ return reflog->entries.length;
}
const git_reflog_entry * git_reflog_entry_byindex(git_reflog *reflog, size_t idx)
@@ -425,25 +425,25 @@ const git_reflog_entry * git_reflog_entry_byindex(git_reflog *reflog, size_t idx
return git_vector_get(&reflog->entries, pos);
}
-const git_oid * git_reflog_entry_oidold(const git_reflog_entry *entry)
+const git_oid * git_reflog_entry_id_old(const git_reflog_entry *entry)
{
assert(entry);
return &entry->oid_old;
}
-const git_oid * git_reflog_entry_oidnew(const git_reflog_entry *entry)
+const git_oid * git_reflog_entry_id_new(const git_reflog_entry *entry)
{
assert(entry);
return &entry->oid_cur;
}
-git_signature * git_reflog_entry_committer(const git_reflog_entry *entry)
+const git_signature * git_reflog_entry_committer(const git_reflog_entry *entry)
{
assert(entry);
return entry->committer;
}
-char * git_reflog_entry_msg(const git_reflog_entry *entry)
+const char * git_reflog_entry_message(const git_reflog_entry *entry)
{
assert(entry);
return entry->msg;