From fcd2c3d9d854712e7fbb8e7be5a809029aab0a84 Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Wed, 22 Dec 2021 05:06:48 +0100 Subject: reflog + refs-backend: move "verbose" out of the backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the handling of the "verbose" flag entirely out of "refs/files-backend.c" and into "builtin/reflog.c". This allows the backend to stop knowing about the EXPIRE_REFLOGS_VERBOSE flag. The expire_reflog_ent() function shouldn't need to deal with the implementation detail of whether or not we're emitting verbose output, by doing this the --verbose output becomes backend-agnostic, so reftable will get the same output. I think the output is rather bad currently, and should e.g. be implemented with some better future mode of progress.[ch], but that's a topic for another improvement. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- refs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'refs.h') diff --git a/refs.h b/refs.h index 92360e55a2..8f91a7f9ff 100644 --- a/refs.h +++ b/refs.h @@ -820,8 +820,7 @@ enum ref_type ref_type(const char *refname); enum expire_reflog_flags { EXPIRE_REFLOGS_DRY_RUN = 1 << 0, EXPIRE_REFLOGS_UPDATE_REF = 1 << 1, - EXPIRE_REFLOGS_VERBOSE = 1 << 2, - EXPIRE_REFLOGS_REWRITE = 1 << 3 + EXPIRE_REFLOGS_REWRITE = 1 << 2, }; /* -- cgit v1.3