git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
ZheNing Hu <adlternative@gmail.com>
Date
Mar 1, 2023, 09:31 UTC
Message-ID
<CAOLTT8S3SFbJccDjkUGpjxehbrOiCswamjzy0WQhEb285BBMbQ@mail.gmail.com>
In-Reply-To
<xmqqlekjt7lx.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 于2023年2月28日周二 00:07写道:
Show 33 quoted lines
>
> "ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: ZheNing Hu <adlternative@gmail.com>
> >
> > 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 <adlternative@gmail.com>
> > ---
> >  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.
>

Ah, I should have incorporated this part of the test into another patch test.

> Thanks.
Previous: Junio C HamanoNext: ZheNing Hu via GitGitGadget
Message 16 of 20 in “[RFC] push: allow delete one level ref”
  1. 0/2 [RFC] push: allow delete one level refZheNing Hu via GitGitGadget, Jan 17, 2023
  2. 1/2 receive-pack: fix funny ref error messsageZheNing Hu via GitGitGadget, Jan 17, 2023
  3. 2/2 [RFC] push: allow delete one level refZheNing Hu via GitGitGadget, Jan 17, 2023
  4. Ævar Arnfjörð BjarmasonJan 17, 2023
  5. ZheNing HuJan 19, 2023
  6. 0/2 [RFC] push: allow delete one level refZheNing Hu via GitGitGadget, Feb 4, 2023
  7. 1/2 receive-pack: fix funny ref error messsageZheNing Hu via GitGitGadget, Feb 4, 2023
  8. 2/2 [RFC] push: allow delete one level refZheNing Hu via GitGitGadget, Feb 4, 2023
  9. Junio C HamanoFeb 6, 2023
  10. ZheNing HuFeb 24, 2023
  11. Junio C HamanoFeb 24, 2023
  12. ZheNing HuFeb 25, 2023
  13. 0/2 [RFC] push: allow delete one level refZheNing Hu via GitGitGadget, Feb 27, 2023
  14. 1/2 receive-pack: fix funny ref error messsageZheNing Hu via GitGitGadget, Feb 27, 2023
  15. Junio C HamanoFeb 27, 2023
  16. ZheNing HuMar 1, 2023
  17. 2/2 [RFC] push: allow delete single-level refZheNing Hu via GitGitGadget, Feb 27, 2023
  18. 0/2 [RFC] push: allow delete one level refZheNing Hu via GitGitGadget, Mar 1, 2023
  19. 1/2 receive-pack: fix funny ref error messsageZheNing Hu via GitGitGadget, Mar 1, 2023
  20. 2/2 push: allow delete single-level refZheNing Hu via GitGitGadget, Mar 1, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.