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

Re: [PATCH v5] builtin/reflog.c: use parse-options api for expire, delete subcommands

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 6, 2022, 21:09 UTC
Message-ID
<xmqq1r1kd11v.fsf@gitster.g>
In-Reply-To
<pull.1175.v5.git.git.1641495981650.gitgitgadget@gmail.com>
"John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 11 quoted lines
> From: John Cai <johncai86@gmail.com>
>
> Switching out manual arg parsing for the parse-options API for the
> expire and delete subcommands.
>
> Move explicit_expiry flag into cmd_reflog_expire_cb struct so callbacks
> can set both the value of the timestamp as well as the explicit_expiry
> flag.
>
> Signed-off-by: "John Cai" <johncai86@gmail.com>
> ---
Thanks.  Will queue.
Show 7 quoted lines
>      @@ builtin/reflog.c: static void set_reflog_expiry_param(struct cmd_reflog_expire_c
>       +	const struct option options[] = {
>       +		OPT_BIT(0, "dry-run", &flags, N_("do not actually prune any entries"),
>       +			EXPIRE_REFLOGS_DRY_RUN),
>      -+		OPT_BIT(0, "rewrite", &flags,
>      ++			OPT_BIT(0, "rewrite", &flags,
>       +			N_("rewrite the old SHA1 with the new SHA1 of the entry that now precedes it"),
I think this change is a fat-finger; will correct while queuing.
Previous: John Cai via GitGitGadgetNext: John Cai
Message 18 of 19 in “reflog.c: switch to use parse-options API”
  1. 0/2 reflog.c: switch to use parse-options APIJohn Cai via GitGitGadget, Dec 31, 2021
  2. 1/2 builtin/reflog.c: use parse-options for expire subcommandJohn Cai via GitGitGadget, Dec 31, 2021
  3. John CaiJan 1, 2022
  4. René ScharfeJan 1, 2022
  5. John CaiJan 1, 2022
  6. René ScharfeJan 2, 2022
  7. 2/2 builtin/reflog.c: switch to use parse-options API for delete subcommandJohn Cai via GitGitGadget, Dec 31, 2021
  8. 0/2 reflog.c: switch to use parse-options APIJohn Cai via GitGitGadget, Jan 3, 2022
  9. 1/2 parse-options.h: add parse_opt_expiry_date helperJohn Cai via GitGitGadget, Jan 3, 2022
  10. Junio C HamanoJan 4, 2022
  11. 2/2 builtin/reflog.c: switch to use parse-options API for delete subcommandJohn Cai via GitGitGadget, Jan 3, 2022
  12. Junio C HamanoJan 4, 2022
  13. builtin/reflog.c: use parse-options api for expire, delete subcommandsJohn Cai via GitGitGadget, Jan 4, 2022
  14. Junio C HamanoJan 4, 2022
  15. builtin/reflog.c: use parse-options api for expire, delete subcommandsJohn Cai via GitGitGadget, Jan 5, 2022
  16. Junio C HamanoJan 5, 2022
  17. builtin/reflog.c: use parse-options api for expire, delete subcommandsJohn Cai via GitGitGadget, Jan 6, 2022
  18. Junio C HamanoJan 6, 2022
  19. John CaiJan 6, 2022

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.