Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-08-19 15:01:49 +0400
committerCarlos Martín Nieto <cmn@dwim.me>2013-10-02 08:53:24 +0400
commitb976f3c2c228413d124be8fea3280a44bd5e3136 (patch)
tree32e6712711c61a5d27bbed347901afc242bdc8dd /src/revparse.c
parent71e33d2649f990086237a6cd0fdb7f7d6f742b51 (diff)
reflog: move the reflog implementation into refdb_fs
References and their logs are logically coupled, let's make it so in the code by moving the fs-based reflog implementation to live next to the fs-based refs one. As part of the change, make the function take names rather than references, as only the names are relevant when looking up and handling reflogs.
Diffstat (limited to 'src/revparse.c')
-rw-r--r--src/revparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/revparse.c b/src/revparse.c
index e470a954d..c120b466f 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -160,7 +160,7 @@ static int retrieve_previously_checked_out_branch_or_revision(git_object **out,
if (git_reference_lookup(&ref, repo, GIT_HEAD_FILE) < 0)
goto cleanup;
- if (git_reflog_read(&reflog, ref) < 0)
+ if (git_reflog_read(&reflog, repo, GIT_HEAD_FILE) < 0)
goto cleanup;
numentries = git_reflog_entrycount(reflog);
@@ -208,7 +208,7 @@ static int retrieve_oid_from_reflog(git_oid *oid, git_reference *ref, size_t ide
const git_reflog_entry *entry;
bool search_by_pos = (identifier <= 100000000);
- if (git_reflog_read(&reflog, ref) < 0)
+ if (git_reflog_read(&reflog, git_reference_owner(ref), git_reference_name(ref)) < 0)
return -1;
numentries = git_reflog_entrycount(reflog);