git-commit-vandalism/refs
Michael Haggerty d24b21e9fc for_each_reflog(): don't abort for bad references
If there is a file under "$GIT_DIR/logs" with no corresponding
reference, the old code was emitting an error message, aborting the
reflog iteration, and returning -1. But

* None of the callers was checking the exit value

* The callers all want to find all legitimate reflogs (sometimes for the
  purpose of determining object reachability!) and wouldn't benefit from
  a truncated iteration anyway.

So instead, emit an error message and skip the "broken" reflog, but
continue with the iteration.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-20 11:38:20 -07:00
..
files-backend.c for_each_reflog(): don't abort for bad references 2016-06-20 11:38:20 -07:00
iterator.c do_for_each_ref(): reimplement using reference iteration 2016-06-20 11:38:20 -07:00
refs-internal.h do_for_each_ref(): reimplement using reference iteration 2016-06-20 11:38:20 -07:00