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

Re: [PATCH v4 15/16] branch: use ref-filter printing APIs

From
Jeff King <peff@peff.net>
Date
Apr 15, 2016, 21:09 UTC
Message-ID
<20160415210947.GA21678@sigill.intra.peff.net>
In-Reply-To
<CAOLa=ZSdnDFR52BJB1dm-D=gyUo=oB0aoh5pKAvwyNG5+u0P_A@mail.gmail.com>
On Sat, Apr 16, 2016 at 01:57:23AM +0530, Karthik Nayak wrote:
> I had a look at your patch and even tested it, seems solid, I like how you
> integrated all these atoms together under refname_atom_parser_internal().
> I'm squashing this in, for my re-roll. Thanks.
Great, thanks for picking it up.
Show 12 quoted lines
> > So actually, we _do_ accept "%(upstream:short,track)" with your
> > patch, which is somewhat nonsensical. It just ignores "short" and
> > takes whatever option came last. Which is reasonable, though
> > flagging an error would also be reasonable (and I think is what
> > existing git does). I don't think it matters much either way.
> >
> 
> I think it was decided a while ago that it'd be best to ignore all and
> accept the last argument without barfing, I couldn't find the exact
> link. But I'm open to both.  But if you look at the %(align) atom,
> even that accepts mutually exclusive arguments and accepts the last
> argument without reporting an error.

Makes sense, and I'm fine with how you have it (and my patch tried to retain that property). I just wasn't sure if it was intentional, as I did a bad job of paying attention to earlier rounds of the series. Thank you for keeping at it.

-Peff
Previous: Karthik Nayak
Message 31 of 31 in “port branch.c to use ref-filter's printing options”
  1. 00/16 port branch.c to use ref-filter's printing optionsKarthik Nayak, Apr 9, 2016
  2. 01/16 ref-filter: implement %(if), %(then), and %(else) atomsKarthik Nayak, Apr 9, 2016
  3. 02/16 ref-filter: include reference to 'used_atom' within 'atom_value'Karthik Nayak, Apr 9, 2016
  4. 03/16 ref-filter: implement %(if:equals=<string>) and %(if:notequals=<string>)Karthik Nayak, Apr 9, 2016
  5. 04/16 ref-filter: modify "%(objectname:short)" to take lengthKarthik Nayak, Apr 9, 2016
  6. 05/16 ref-filter: move get_head_description() from branch.cKarthik Nayak, Apr 9, 2016
  7. 06/16 ref-filter: introduce format_ref_array_item()Karthik Nayak, Apr 9, 2016
  8. 07/16 ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreamsKarthik Nayak, Apr 9, 2016
  9. 08/16 ref-filter: add support for %(upstream:track,nobracket)Karthik Nayak, Apr 9, 2016
  10. 09/16 ref-filter: make "%(symref)" atom work with the ':short' modifierKarthik Nayak, Apr 9, 2016
  11. 10/16 ref-filter: introduce symref_atom_parser()Karthik Nayak, Apr 9, 2016
  12. 11/16 ref-filter: introduce refname_atom_parser()Karthik Nayak, Apr 9, 2016
  13. Jeff KingApr 14, 2016
  14. Karthik NayakApr 15, 2016
  15. 12/16 ref-filter: add support for %(refname:dir) and %(refname:base)Karthik Nayak, Apr 9, 2016
  16. 13/16 ref-filter: allow porcelain to translate messages in the outputKarthik Nayak, Apr 9, 2016
  17. 14/16 branch, tag: use porcelain outputKarthik Nayak, Apr 9, 2016
  18. 15/16 branch: use ref-filter printing APIsKarthik Nayak, Apr 9, 2016
  19. Junio C HamanoApr 12, 2016
  20. Junio C HamanoApr 12, 2016
  21. Karthik NayakApr 13, 2016
  22. Stefan BellerApr 16, 2016
  23. Karthik NayakApr 17, 2016
  24. 16/16 branch: implement '--format' optionKarthik Nayak, Apr 9, 2016
  25. Karthik NayakApr 13, 2016
  26. Jeff KingApr 13, 2016
  27. Karthik NayakApr 14, 2016
  28. Jeff KingApr 14, 2016
  29. Jeff KingApr 14, 2016
  30. Karthik NayakApr 15, 2016
  31. Jeff KingApr 15, 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.