# Re: \[PATCH v3 1/2\] receive-pack: fix funny ref error messsage

- From: Junio C Hamano \<hidden\>
- Date: 2023-02-27 16:07:29 
- List: git
- Page: https://ratatoskr.run/git/2023/02/7965836
- Thread: https://ratatoskr.run/git/2023/02/7965836/t.md

```text
"ZheNing Hu via GitGitGadget" [ref] writes:

> From: ZheNing Hu <redacted>
>
> 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".

OK, update() works on each ref affected, not just the ones that are
updated, but also created and deleted.  The updated wording may
probably be better.


>
> Signed-off-by: ZheNing Hu <redacted>
> ---
>  builtin/receive-pack.c | 2 +-
>  t/t5516-fetch-push.sh  | 5 +++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> ...
> +test_expect_success 'push with onelevel ref' '
> +	mk_test testrepo heads/main &&
> +	test_must_fail git push testrepo HEAD:refs/onelevel
> +'
> +

I am not sure what relevance this new test has to the proposed
update to the message, though.

Thanks.
```
