summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-08-19 13:01:49 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-10-02 06:53:24 +0200
commitb976f3c2c228413d124be8fea3280a44bd5e3136 (patch)
tree32e6712711c61a5d27bbed347901afc242bdc8dd /src/refs.c
parent71e33d2649f990086237a6cd0fdb7f7d6f742b51 (diff)
downloadlibgit2-b976f3c2c228413d124be8fea3280a44bd5e3136.tar.gz
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/refs.c')
-rw-r--r--src/refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refs.c b/src/refs.c
index c045ab9dc..abec356b5 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -467,7 +467,7 @@ int git_reference_rename(
if (reference_has_log < 0)
return reference_has_log;
- if (reference_has_log && (error = git_reflog_rename(ref, new_name)) < 0)
+ if (reference_has_log && (error = git_reflog_rename(git_reference_owner(ref), git_reference_name(ref), new_name)) < 0)
return error;
return 0;