mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
receive-pack: fix funny ref error messsage
When the user deletes the remote one level branch through "git push origin -d refs/foo", remote will return an error: "refusing to create funny ref 'refs/foo' remotely", here we are not creating "refs/foo" instead wants to delete it, so a better error description here would be: "refusing to update funny ref 'refs/foo' remotely". Signed-off-by: ZheNing Hu <adlternative@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
dadc8e6dac
commit
d81ba50a9b
|
@ -1464,7 +1464,7 @@ static const char *update(struct command *cmd, struct shallow_info *si)
|
||||||
|
|
||||||
/* only refs/... are allowed */
|
/* only refs/... are allowed */
|
||||||
if (!starts_with(name, "refs/") || check_refname_format(name + 5, 0)) {
|
if (!starts_with(name, "refs/") || check_refname_format(name + 5, 0)) {
|
||||||
rp_error("refusing to create funny ref '%s' remotely", name);
|
rp_error("refusing to update funny ref '%s' remotely", name);
|
||||||
ret = "funny refname";
|
ret = "funny refname";
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue