diff options
Diffstat (limited to 'builtin-fsck.c')
-rw-r--r-- | builtin-fsck.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/builtin-fsck.c b/builtin-fsck.c index f6f1967449..6da3814d59 100644 --- a/builtin-fsck.c +++ b/builtin-fsck.c @@ -477,6 +477,12 @@ static int fsck_handle_reflog_ent(unsigned char *osha1, unsigned char *nsha1, return 0; } +static int fsck_handle_reflog(const char *logname, const unsigned char *sha1, int flag, void *cb_data) +{ + for_each_reflog_ent(logname, fsck_handle_reflog_ent, NULL); + return 0; +} + static int fsck_handle_ref(const char *refname, const unsigned char *sha1, int flag, void *cb_data) { struct object *obj; @@ -495,14 +501,13 @@ static int fsck_handle_ref(const char *refname, const unsigned char *sha1, int f obj->used = 1; mark_reachable(obj, REACHABLE); - for_each_reflog_ent(refname, fsck_handle_reflog_ent, NULL); - return 0; } static void get_default_heads(void) { for_each_ref(fsck_handle_ref, NULL); + for_each_reflog(fsck_handle_reflog, NULL); /* * Not having any default heads isn't really fatal, but |