(h plumbing.Hash)
| 540 | } |
| 541 | |
| 542 | func (s *ObjectStorage) findObjectInPackfile(h plumbing.Hash) (plumbing.Hash, plumbing.Hash, int64) { |
| 543 | for packfile, index := range s.index { |
| 544 | offset, err := index.FindOffset(h) |
| 545 | if err == nil { |
| 546 | return packfile, h, offset |
| 547 | } |
| 548 | } |
| 549 | |
| 550 | return plumbing.ZeroHash, plumbing.ZeroHash, -1 |
| 551 | } |
| 552 | |
| 553 | // HashesWithPrefix returns all objects with a hash that starts with a prefix by searching for |
| 554 | // them in the packfile and the git object directories. |
no test coverage detected