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

Re: [PATCH 1/4] push options: {pre,post}-receive hook learns about push options

From
Stefan Beller <sbeller@google.com>
Date
Jul 1, 2016, 19:50 UTC
Message-ID
<CAGZ79kaRG7SOcz1LyOkN8W_dpmK_AjwYyyMrZftZCac9fCo+EQ@mail.gmail.com>
In-Reply-To
<20160701193909.GA23141@sigill.intra.peff.net>
On Fri, Jul 1, 2016 at 12:39 PM, Jeff King <peff@peff.net> wrote:
>
> That was sort of my question. _Is it_ too bad or not? It's hard to say
> without knowing the use cases.
>
...
>
> That's ugly, of course, but not really uglier than the parsing required
> for the COUNT proposal.
ok, I'll try to get the COUNT proposal in good enough shape.
Show 6 quoted lines
>
> I'm assuming that git actually knows about and enforces that things are
> "key=value". I'm not sure how you'd get by without that (you'd have to
> infer the meaning of a parameter by its position, which seems like a
> recipe for mistakes and incompatibilities).
>

Of course! We could use "a hack" just like in the Git config itself. If a boolean parameter is not given, the default is assumed. If it is given the opposite is assumed. Same for attributes, that can be set by just giving the key (with no "=true").

So I think I can be convinced to go only with key/value pairs for now, but it would be easier if you'd just have

    git push -o draft ...
Previous: Jeff KingNext: Stefan Beller
Message 15 of 22 in “[RFC PATCHv1 0/4] Push options in C Git”
  1. Stefan BellerJun 30, 2016
  2. 2/4 receive-pack: implement advertising and receiving push optionsStefan Beller, Jun 30, 2016
  3. Junio C HamanoJul 1, 2016
  4. Stefan BellerJul 1, 2016
  5. 4/4 add a test for push optionsStefan Beller, Jun 30, 2016
  6. 1/4 push options: {pre,post}-receive hook learns about push optionsStefan Beller, Jun 30, 2016
  7. Jeff KingJul 1, 2016
  8. Stefan BellerJul 1, 2016
  9. Jeff KingJul 1, 2016
  10. Junio C HamanoJul 1, 2016
  11. Jeff KingJul 1, 2016
  12. Junio C HamanoJul 1, 2016
  13. Stefan BellerJul 1, 2016
  14. Jeff KingJul 1, 2016
  15. Stefan BellerJul 1, 2016
  16. Stefan BellerJul 1, 2016
  17. 3/4 push: accept push optionsStefan Beller, Jun 30, 2016
  18. Jeff KingJul 1, 2016
  19. Stefan BellerJul 1, 2016
  20. Jeff KingJul 1, 2016
  21. Stefan BellerJul 1, 2016
  22. Jeff KingJul 1, 2016

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.