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

Re: [PATCH v2] builtin/receive-pack.c: use parse_options API

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 2, 2016, 09:53 UTC
Message-ID
<CACsJy8Dc38BrAHJ2t3HRdrk=A7VR7SFqc03wyajKrydsiCfoNw@mail.gmail.com>
In-Reply-To
<1456863661-22783-1-git-send-email-tigerkid001@gmail.com>

On Wed, Mar 2, 2016 at 3:21 AM, Sidhant Sharma [:tk] <tigerkid001@gmail.com> wrote:

Show 7 quoted lines
> +       struct option options[] = {
> +               OPT__QUIET(&quiet, N_("quiet")),
> +               OPT_HIDDEN_BOOL(0, "stateless-rpc", &stateless_rpc, NULL),
> +               OPT_HIDDEN_BOOL(0, "advertise-refs", &advertise_refs, NULL),
> +               OPT_HIDDEN_BOOL(0, "reject-thin-pack-for-testing", &reject_thin, NULL),
> +               OPT_END()
> +       };

If the patch is already final, don't bother. If not, I think I prefer to keep all these options visible (except the "...-for-testing"). This command is never executed directly by mere mortals. The ones that run it need to know all about these hidden tricks because they're implementing new transports.

Another side note. I'm not so sure if we should N_() and _() strings in this command (same reasoning, the command's user is very likely developers, not true users). But it does not harm to i18n-ize the command either. Slightly more work for translators, of course.

-- 
Duy
Previous: Matthieu MoyNext: Sidhant Sharma
Message 13 of 14 in “builtin/receive-pack.c: use parse_options API”
  1. builtin/receive-pack.c: use parse_options APISidhant Sharma [:tk], Mar 1, 2016
  2. Matthieu MoyMar 1, 2016
  3. Sidhant SharmaMar 1, 2016
  4. Matthieu MoyMar 1, 2016
  5. Eric SunshineMar 1, 2016
  6. builtin/receive-pack.c: use parse_options APISidhant Sharma [:tk], Mar 1, 2016
  7. Sidhant SharmaMar 1, 2016
  8. Matthieu MoyMar 1, 2016
  9. Junio C HamanoMar 1, 2016
  10. Sidhant SharmaMar 2, 2016
  11. Junio C HamanoMar 2, 2016
  12. Matthieu MoyMar 2, 2016
  13. Duy NguyenMar 2, 2016
  14. Sidhant SharmaMar 2, 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.