Commit 561ed22
committed
pack/set: ignore packs without indices
When we look for packs to read, we look for a pack file, and then an
index, and fail if either one is missing. When Git looks for packs to
read, it looks only for indices and then checks if the pack is present.
The Git approach handles the case when there is an extra pack that lacks
an index, while our approach does not. Consequently, we can get various
errors (showing up so far only on Windows) when an index is missing.
If the index file cannot be read for any reason, simply skip the entire
pack altogether and continue on. This leaves us no more or less
functional than Git in terms of discovering objects and makes our error
handling more robust.1 parent fe8fbf7 commit 561ed22
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | | - | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
0 commit comments