refs: remove seemingly useless giterr_clear() call
diff --git a/src/refs.c b/src/refs.c
index fbbb866..e8f9fc8 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1409,8 +1409,6 @@ int git_reference_rename(git_reference *ref, const char *new_name, int force)
if ((git_reference_has_log(ref)) && (git_reflog_rename(ref, new_name) < 0))
goto cleanup;
- giterr_clear();
-
/*
* Change the name of the reference given by the user.
*/