From 33d7bdd64592d6dc86583a817719f91d7344e958 Mon Sep 17 00:00:00 2001 From: John Cai Date: Thu, 6 Jan 2022 19:06:21 +0000 Subject: [PATCH] builtin/reflog.c: use parse-options api for expire, delete subcommands 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" Signed-off-by: Junio C Hamano --- builtin/reflog.c | 176 ++++++++++++++++++++++++++--------------------- 1 file changed, 97 insertions(+), 79 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index a4b1dd27e1..85b838720c 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -12,15 +12,6 @@ #include "reachable.h" #include "worktree.h" -/* NEEDSWORK: switch to using parse_options */ -static const char reflog_expire_usage[] = -N_("git reflog expire [--expire=