Merge pull request #245 from schu/use-normalized

rename-reference: use normalized path
This commit is contained in:
Vicent Martí 2011-06-07 07:04:51 -07:00
commit a5aa5bd1d1

View File

@ -1120,6 +1120,8 @@ static int reference_rename(git_reference *ref, const char *new_name, int force)
if (error < GIT_SUCCESS) if (error < GIT_SUCCESS)
return git__rethrow(error, "Failed to rename reference"); return git__rethrow(error, "Failed to rename reference");
new_name = normalized_name;
/* Ensure we're not going to overwrite an existing reference /* Ensure we're not going to overwrite an existing reference
unless the user has allowed us */ unless the user has allowed us */
error = git_reference_lookup(&looked_up_ref, ref->owner, new_name); error = git_reference_lookup(&looked_up_ref, ref->owner, new_name);