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

Re: [RFC PATCH 0/2] Add named reference to latest push cert

From
Stefan Beller <sbeller@google.com>
Date
Sep 18, 2017, 17:43 UTC
Message-ID
<CAGZ79kZnBoycG-LSftdivfsT8yE53R2JhNRDfVztwqmETeDFKA@mail.gmail.com>
In-Reply-To
<20170918142205.r5kwkq7ouy5zxisz@LykOS.localdomain>
On Mon, Sep 18, 2017 at 7:22 AM, Santiago Torres <santiago@nyu.edu> wrote:
Show 9 quoted lines
> Hello, everyone.
>
> Sorry for being late in this thread, I was making sure I didn't say
> anything outrageously wrong.
>
>> That's Stefan; I wouldn't have suggested any approach that uses the
>> blob whose sole purpose is to serve as a temporary storage area to
>> pass the information to the hook as part of the permanent record.
>>

I put out a vague design that seemed to have more advantages in my mind at the time of writing. :)

Show 13 quoted lines
>
> Hmm, as far as I understand *this* is the status quo. We get an
> ephemeral sha1/oid only if you have a hook attached. Otherwise, you will
> never see the object at all, even if you have --signed set.
>
> I suggested preparing this RFC/Patch because of the following reasons
> (please let me know if my understanding of any of this is wrong...):
>
>     - I find it weird that the cli allows for a --signed push and
>       nowhere in the receive-pack's feedback you're told if the push
>       certificate is compute/stored/handled at all. I think that, at the
>       latest, receive pack should let the user know whether the signed
>       push succeeded, or if there is no hook attached to handle it.

How would a user benefit from it? (Are there cases where the organisation wants the user to not know deliberately what happened to their push cert? Do we care about these cases?)

Show 6 quoted lines
>     - *if there is a hook* the blob is computed, but it is up to the
>       hook itself to store it *somewhere*. This makes me feel like it's
>       somewhat of a useless waste of computation if the hook is not
>       meant to handle it anyway(which is just a post-receive hook). I
>       find it rather weird that --signed is a builtin flag, and is
>       handled on the server side only partially (just my two cents).
I agree, but many features in Git start out small and only partially.
Show 14 quoted lines
>     - To me, the way push certificates are handled now feels like having
>       git commit -S producing a detached signature that you have to
>       embed somehow in the resulting commit object. (As a matter of
>       fact, many points on [1] seem to back this notion, and even recall
>       some drawbacks on push certificates the way they are handled
>       today)
>
> I understand the concurrency concerns, so I agree with stefan's
> solution, although I don't know how big of a deal it would be, if git
> already supports --atomic pushes (admittedly, I haven't checked if there
> are any guards in place for someone who pushes millions of refs
> atomically). It'd be completely understandable to have a setting to
> disable hadnling of --signed pushes and, ideally, a way to warn the user
> of this feature being disabled if --signed is sent.
That makes sense.
Previous: Santiago TorresNext: Junio C Hamano
Message 9 of 16 in “Re: [RFC PATCH 0/2] Add named reference to latest push cert”
  1. Stefan BellerSep 6, 2017
  2. Junio C HamanoSep 7, 2017
  3. Shikher VermaSep 7, 2017
  4. Shikher VermaSep 7, 2017
  5. Stefan BellerSep 7, 2017
  6. Shikher VermaSep 16, 2017
  7. Junio C HamanoSep 17, 2017
  8. Santiago TorresSep 18, 2017
  9. Stefan BellerSep 18, 2017
  10. Junio C HamanoSep 19, 2017
  11. Junio C HamanoSep 19, 2017
  12. Add a sample hook which saves push certs as notesShikher Verma, Dec 2, 2017
  13. Todd ZullingerDec 3, 2017
  14. Junio C HamanoDec 3, 2017
  15. Shikher VermaSep 7, 2017
  16. Stefan BellerSep 7, 2017

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.