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

Re: [PATCH 2/2] [GSOC] ref-filter: add %(raw) atom

From
ZheNing Hu <adlternative@gmail.com>
Date
Jun 3, 2021, 14:06 UTC
Message-ID
<CAOLTT8QjnFqXHRzAPnJStf4Ra189dZFe9k-Y9COoSCwW47CXiA@mail.gmail.com>
In-Reply-To
<CAOLTT8TiyAtJfcrPoBF6SECfaKOTKt24NSOtTmf84JwHrU8g1A@mail.gmail.com>
ZheNing Hu <adlternative@gmail.com> 于2021年6月3日周四 下午1:36写道:
Show 13 quoted lines
>
> Junio C Hamano <gitster@pobox.com> 于2021年6月3日周四 上午10:38写道:
> > But I do not think we want to add the new change at this location,
> > at least for two reasons:
> >
> >  * The posted patch checks '!arg' to avoid rejecting "raw:size",
> >    which would not scale at all.  What if you wanted to later add
> >    "raw:upcase", which you must reject?
> >
>
> Yeah, the code here makes "raw" lack of scalability. Especially we
> want to add "%(raw:textconv)" and "%(raw:filter)" later.
>

Now I am building %(raw:textconv) and %(raw:filter), the code will be very difficult to write:

        if (format->quote_style && !strncmp(sp, "raw", 3)
                                && ((!arg) || (!strncmp(arg,
":textconv", 9)) || (!strncmp(arg, ":filter", 7))))
                return strbuf_addf_ret(err, -1, _("--format=%.*s
cannot be used with"
                                "--python, --shell, --tcl, --perl"),
(int)(ep-atom), atom);
Is there any good way?

Thanks. -- ZheNing Hu

Previous: ZheNing HuNext: Junio C Hamano
Message 8 of 23 in “[GSOC] ref-filter: add %(raw) atom”
  1. 0/2 [GSOC] ref-filter: add %(raw) atomZheNing Hu via GitGitGadget, Jun 1, 2021
  2. 1/2 [GSOC] ref-filter: add obj-type check in grab contentsZheNing Hu via GitGitGadget, Jun 1, 2021
  3. Junio C HamanoJun 3, 2021
  4. ZheNing HuJun 3, 2021
  5. 2/2 [GSOC] ref-filter: add %(raw) atomZheNing Hu via GitGitGadget, Jun 1, 2021
  6. Junio C HamanoJun 3, 2021
  7. ZheNing HuJun 3, 2021
  8. ZheNing HuJun 3, 2021
  9. Junio C HamanoJun 3, 2021
  10. Junio C HamanoJun 3, 2021
  11. ZheNing HuJun 4, 2021
  12. Bagas SanjayaJun 3, 2021
  13. ZheNing HuJun 3, 2021
  14. 0/2 [GSOC] ref-filter: add %(raw) atomZheNing Hu via GitGitGadget, Jun 4, 2021
  15. 1/2 [GSOC] ref-filter: add obj-type check in grab contentsZheNing Hu via GitGitGadget, Jun 4, 2021
  16. 2/2 [GSOC] ref-filter: add %(raw) atomZheNing Hu via GitGitGadget, Jun 4, 2021
  17. Christian CouderJun 4, 2021
  18. Christian CouderJun 4, 2021
  19. ZheNing HuJun 5, 2021
  20. Christian CouderJun 5, 2021
  21. ZheNing HuJun 5, 2021
  22. Christian CouderJun 5, 2021
  23. ZheNing HuJun 5, 2021

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.