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

Re: [PATCH 4/6] [GSOC] ref-filter: add %(rest) atom and --rest option

From
Hariom verma <hariom18599@gmail.com>
Date
Jun 5, 2021, 15:20 UTC
Message-ID
<CA+CkUQ9f8kN=S8dU_zt=-uG1pcK8cE9CuhJdqR9oMwcguZ9FLg@mail.gmail.com>
In-Reply-To
<ccdd18ad508824aa206a02c479229d0ede69522d.1622884415.git.gitgitgadget@gmail.com>
Hi,

On Sat, Jun 5, 2021 at 2:43 PM ZheNing Hu via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 13 quoted lines
>
> From: ZheNing Hu <adlternative@gmail.com>
>
> --- a/builtin/branch.c
> +++ b/builtin/branch.c
> @@ -670,6 +674,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
>                         N_("print only branches of the object"), parse_opt_object_name),
>                 OPT_BOOL('i', "ignore-case", &icase, N_("sorting and filtering are case insensitive")),
>                 OPT_STRING(  0 , "format", &format.format, N_("format"), N_("format to use for the output")),
> +               OPT_STRING(0, "rest", &format.rest, N_("rest"), N_("specify %(rest) contents")),
>                 OPT_END(),
>         };
>

Although it's not related to this patch. But I just noticed an unusual extra space(s) before the first argument of `OPT_STRING()`. (above the line you added)

Show 10 quoted lines
> --- a/builtin/for-each-ref.c
> +++ b/builtin/for-each-ref.c
> @@ -37,6 +37,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
>
>                 OPT_GROUP(""),
>                 OPT_INTEGER( 0 , "count", &maxcount, N_("show only <n> matched refs")),
> +               OPT_STRING(  0 , "rest", &format.rest, N_("rest"), N_("specify %(rest) contents")),
>                 OPT_STRING(  0 , "format", &format.format, N_("format"), N_("format to use for the output")),
>                 OPT__COLOR(&format.use_color, N_("respect format colors")),
>                 OPT_REF_SORT(sorting_tail),
Here too in `OPT_INTEGER()` and `OPT_INTEGER()`.

Also, I don't think these extra space(s) are intended. So you don't need to imitate them.

Show 10 quoted lines
> --- a/builtin/tag.c
> +++ b/builtin/tag.c
> @@ -481,6 +486,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
>                 OPT_STRING(  0 , "format", &format.format, N_("format"),
>                            N_("format to use for the output")),
>                 OPT__COLOR(&format.use_color, N_("respect format colors")),
> +               OPT_STRING(0, "rest", &format.rest, N_("rest"), N_("specify %(rest) contents")),
>                 OPT_BOOL('i', "ignore-case", &icase, N_("sorting and filtering are case insensitive")),
>                 OPT_END()
>         };
Here too in the first line.

Thanks, Hariom

Previous: ZheNing Hu via GitGitGadgetNext: ZheNing Hu
Message 9 of 27 in “[GSOC][RFC] ref-filter: add %(raw:textconv) and %(raw:filters)”
  1. 0/6 [GSOC][RFC] ref-filter: add %(raw:textconv) and %(raw:filters)ZheNing Hu via GitGitGadget, Jun 5, 2021
  2. 2/6 [GSOC] ref-filter: add %(raw) atomZheNing Hu via GitGitGadget, Jun 5, 2021
  3. Junio C HamanoJun 8, 2021
  4. ZheNing HuJun 8, 2021
  5. 1/6 [GSOC] ref-filter: add obj-type check in grab contentsZheNing Hu via GitGitGadget, Jun 5, 2021
  6. 3/6 [GSOC] ref-filter: use non-const ref_format in *_atom_parser()ZheNing Hu via GitGitGadget, Jun 5, 2021
  7. 5/6 [GSOC] ref-filter: teach grab_sub_body_contents() return value and errZheNing Hu via GitGitGadget, Jun 5, 2021
  8. 4/6 [GSOC] ref-filter: add %(rest) atom and --rest optionZheNing Hu via GitGitGadget, Jun 5, 2021
  9. Hariom vermaJun 5, 2021
  10. ZheNing HuJun 6, 2021
  11. Junio C HamanoJun 7, 2021
  12. ZheNing HuJun 7, 2021
  13. ZheNing HuJun 7, 2021
  14. ZheNing HuJun 8, 2021
  15. Junio C HamanoJun 8, 2021
  16. ZheNing HuJun 8, 2021
  17. Junio C HamanoJun 9, 2021
  18. ZheNing HuJun 9, 2021
  19. Junio C HamanoJun 8, 2021
  20. ZheNing HuJun 8, 2021
  21. 6/6 [GSOC] ref-filter: add %(raw:textconv) and %(raw:filters)ZheNing Hu via GitGitGadget, Jun 5, 2021
  22. Bagas SanjayaJun 5, 2021
  23. ZheNing HuJun 5, 2021
  24. Junio C HamanoJun 7, 2021
  25. ZheNing HuJun 7, 2021
  26. Junio C HamanoJun 8, 2021
  27. ZheNing HuJun 8, 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.