Skip to content

Commit 1ef32f0

Browse files
KarthikNayakgitster
authored andcommitted
refs: move consistency check msg to generic layer
The files-backend prints a message before the consistency checks run. Move this to the generic layer so both the files and reftable backend can benefit from this message. Signed-off-by: Karthik Nayak <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2d2920c commit 1ef32f0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

refs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "commit.h"
3333
#include "wildmatch.h"
3434
#include "ident.h"
35+
#include "fsck.h"
3536

3637
/*
3738
* List of all available backends
@@ -323,6 +324,9 @@ int check_refname_format(const char *refname, int flags)
323324
int refs_fsck(struct ref_store *refs, struct fsck_options *o,
324325
struct worktree *wt)
325326
{
327+
if (o->verbose)
328+
fprintf_ln(stderr, _("Checking references consistency"));
329+
326330
return refs->be->fsck(refs, o, wt);
327331
}
328332

refs/files-backend.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3826,8 +3826,6 @@ static int files_fsck_refs(struct ref_store *ref_store,
38263826
NULL,
38273827
};
38283828

3829-
if (o->verbose)
3830-
fprintf_ln(stderr, _("Checking references consistency"));
38313829
return files_fsck_refs_dir(ref_store, o, "refs", wt, fsck_refs_fn);
38323830
}
38333831

0 commit comments

Comments
 (0)