Skip to content

Commit d81ba50

Browse files
adlternativegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dadc8e6 commit d81ba50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/receive-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,7 @@ static const char *update(struct command *cmd, struct shallow_info *si)
14641464

14651465
/* only refs/... are allowed */
14661466
if (!starts_with(name, "refs/") || check_refname_format(name + 5, 0)) {
1467-
rp_error("refusing to create funny ref '%s' remotely", name);
1467+
rp_error("refusing to update funny ref '%s' remotely", name);
14681468
ret = "funny refname";
14691469
goto out;
14701470
}

0 commit comments

Comments
 (0)