We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fe8fbf7 + 561ed22 commit f0db732Copy full SHA for f0db732
pack/set.go
@@ -55,12 +55,15 @@ func NewSet(db string) (*Set, error) {
55
56
name := submatch[1]
57
58
- packf, err := os.Open(filepath.Join(pd, fmt.Sprintf("pack-%s.pack", name)))
+ idxf, err := os.Open(filepath.Join(pd, fmt.Sprintf("pack-%s.idx", name)))
59
if err != nil {
60
- return nil, err
+ // We have a pack (since it matched the regex), but the
61
+ // index is missing or unusable. Skip this pack and
62
+ // continue on with the next one, as Git does.
63
+ continue
64
}
65
- idxf, err := os.Open(filepath.Join(pd, fmt.Sprintf("pack-%s.idx", name)))
66
+ packf, err := os.Open(filepath.Join(pd, fmt.Sprintf("pack-%s.pack", name)))
67
68
return nil, err
69
0 commit comments