Commit ee8e6afd by Ben Straub

Reflog: correct "new" id for reattaching HEAD

parent 7ac1b899
......@@ -1452,7 +1452,9 @@ static int reflog_append(refdb_fs_backend *backend, const git_reference *ref, co
if (error < 0)
return error;
if (git_reference_target(ref) != NULL)
if (git_reference_symbolic_target(ref) != NULL)
git_reference_name_to_id(&new_id, repo, git_reference_symbolic_target(ref));
else if (git_reference_target(ref) != NULL)
git_oid_cpy(&new_id, git_reference_target(ref));
if ((error = serialize_reflog_entry(&buf, &old_id, &new_id, who, message)) < 0)
......
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