It occurs to me that this maybe should read

```c
while (git_iterator_advance(&entry, fsit) != GIT_ITEROVER) {
    if (!entry) {
        giterr_clear()l
        continue;
    }

    ....
}
```

As it stands, encountering an unreadable item during the iteration will terminate the loop and stop processing of other loose refs. The alternative where we only terminate for `GIT_ITEROVER` and try to advance past other problem entries would allow us to silently skip problem items.

Of course, that relies on the newly implemented behavior that a failed `git_iterator_advance()` will still attempt to skip past the failed item.