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

Re: [PATCH v2] receive-pack: purge temporary data if no command is ready to run

From
Bojun Chen <bojun.cbj@gmail.com>
Date
Feb 7, 2022, 08:02 UTC
Message-ID
<CADuS7Ao0f+zqYL9=QxWM5FvwZ1H5QwbVvWsHij+8V3AdcZUXxw@mail.gmail.com>
In-Reply-To
<CANYiYbHbFmjbMOCKc=UTDEwcL1bpGRrKRafFCUuYxvuHYVkhTg@mail.gmail.com>
Jiang Xin <worldhello.net@gmail.com> 于2022年2月7日周一 11:36写道:
Show 60 quoted lines
>
> On Sat, Feb 5, 2022 at 4:15 PM Bojun Chen <bojun.cbj@gmail.com> wrote:
> >
> > Junio C Hamano <gitster@pobox.com> 于2022年2月2日周三 06:51写道:
> > >
> > > Chen BoJun <bojun.cbj@gmail.com> writes:
> > >
> > > > From: Chen Bojun <bojun.cbj@alibaba-inc.com>
> > > >
> > > > When pushing a hidden ref, e.g.:
> > > >
> > > >     $ git push origin HEAD:refs/hidden/foo
> > > >
> > > > "receive-pack" will reject our request with an error message like this:
> > > >
> > > >     ! [remote rejected] HEAD -> refs/hidden/foo (deny updating a hidden ref)
> > > >
> > > > The remote side ("git-receive-pack") will not create the hidden ref as
> > > > expected, but the pack file sent by "git-send-pack" is left inside the
> > > > remote repository. I.e. the quarantine directory is not purged as it
> > > > should be.
> > >
> > > I was puzzled by the reference to "pushing a hidden ref" at the
> > > beginning of the proposed log message, as it wasn't quite clear that
> > > it was merely an easy-to-reproduce recipe to fall into such a
> > > situation where all ref updates are rejected.
> > >
> >
> > Thanks for the suggestion. Do I have to rewrite this commit message on the v3?
>
> You can start your commit message like this:
>
>     receive-pack: purge temporary data if no command is ready to run
>
>     When pushing to "receive-pack", commands may have already been
>     marked with error_string or skip_update before being fed to the
>     "pre-receive" hook. E.g.:
>
>      * inconsistent push options for signed push.
>      * not permited shallow updates.
>      * encounter connectivity issues.
>      * push to hidden references.
>
>     Take pushing to hidden references as an example.
>
>     In order to reduce the size of reference advertisement for git-push
>     from a client which does not support protocol v2 and push negotiation,
>     the administrator may set certain config variables to hide some
>     references like:
>
>         $ git config --system --add receive.hideRefs refs/merge-requests
>
>     Then, if a user made a push like this:
>
>         $ git push origin HEAD:refs/merge-requests/123/head
>
>     ...
>
> --
> Jiang Xin
Thanks a lot for your suggestion.
Previous: Jiang XinNext: Junio C Hamano
Message 13 of 18 in “receive-pack: purge temporary data if no command is ready to run”
  1. receive-pack: purge temporary data if no command is ready to runBoJun via GitGitGadget, Jan 24, 2022
  2. Ævar Arnfjörð BjarmasonJan 24, 2022
  3. Lertz ChenJan 25, 2022
  4. Junio C HamanoJan 24, 2022
  5. Bojun ChenJan 25, 2022
  6. Jiang XinJan 25, 2022
  7. receive-pack: purge temporary data if no command is ready to runChen BoJun, Jan 29, 2022
  8. Junio C HamanoFeb 1, 2022
  9. Junio C HamanoFeb 1, 2022
  10. Bojun ChenFeb 5, 2022
  11. Junio C HamanoFeb 5, 2022
  12. Jiang XinFeb 7, 2022
  13. Bojun ChenFeb 7, 2022
  14. Junio C HamanoFeb 4, 2022
  15. Bojun ChenFeb 5, 2022
  16. Junio C HamanoFeb 5, 2022
  17. 0/1 purge temporary data if no command is ready to runChen BoJun, Feb 7, 2022
  18. 1/1 receive-pack: purge temporary data if no command is ready to runChen BoJun, Feb 7, 2022

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.