(h plumbing.Hash)
| 549 | } |
| 550 | |
| 551 | func (s *ObjectStorage) findObjectInPackfile(h plumbing.Hash) (plumbing.Hash, plumbing.Hash, int64) { |
| 552 | for packfile, index := range s.index { |
| 553 | offset, err := index.FindOffset(h) |
| 554 | if err == nil { |
| 555 | return packfile, h, offset |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | return plumbing.ZeroHash, plumbing.ZeroHash, -1 |
| 560 | } |
| 561 | |
| 562 | // HashesWithPrefix returns all objects with a hash that starts with a prefix by searching for |
| 563 | // them in the packfile and the git object directories. |
no test coverage detected