From 1e91d3faf6c6de7667603c9c81252161ee70d7b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 17 Mar 2022 19:08:36 +0100 Subject: [PATCH] reflog: move "usage" variables and use macros MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Move the "usage" variables in builtin/reflog.c to the top of the file, in preparation for later commits defining a common "reflog_usage" in terms of some of these strings, as was done in 8757b35d443 (commit-graph: define common usage with a macro, 2021-08-23). While we're at it let's make them "const char *const", as is the convention with these "usage" variables. The use of macros here is a bit odd, but in subsequent commits we'll make these use the same pattern as builtin/commit-graph.c uses since 8757b35d443 (commit-graph: define common usage with a macro, 2021-08-23). Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- builtin/reflog.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index c864f27630..25313d504a 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -5,8 +5,31 @@ #include "worktree.h" #include "reflog.h" +#define BUILTIN_REFLOG_EXPIRE_USAGE \ + N_("git reflog expire [--expire=