This method works for both direct and symbolic references.
The new name will be checked for validity.
See git_reference_symbolic_create() for rules about valid names.
If the force flag is not enabled, and there's already
a reference with the given name, the renaming will fail.
IMPORTANT:
The user needs to write a proper reflog entry if the
reflog is enabled for the repository. We only rename
the reflog if it exists.
@param ref_ The reference to rename
@param new_name The new name for the reference
@param force Overwrite an existing reference
@param log_message The one line long message to be appended to the reflog
@return 0 on success, git_error_code.GIT_EINVALIDSPEC, git_error_code.GIT_EEXISTS or an error code
Rename an existing reference.
This method works for both direct and symbolic references.
The new name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.
If the force flag is not enabled, and there's already a reference with the given name, the renaming will fail.
IMPORTANT: The user needs to write a proper reflog entry if the reflog is enabled for the repository. We only rename the reflog if it exists.
@param ref_ The reference to rename @param new_name The new name for the reference @param force Overwrite an existing reference @param log_message The one line long message to be appended to the reflog @return 0 on success, git_error_code.GIT_EINVALIDSPEC, git_error_code.GIT_EEXISTS or an error code