incomingObjectPath is intended to add support for a git pre-receive hook to be written it adds support for go-git to find objects in an "incoming" directory, so that the library can be used to write a pre-receive hook that deals with the incoming objects. More on git hooks found here : https://git-
(h plumbing.Hash)
| 581 | // |
| 582 | // https://git-scm.com/docs/git-receive-pack |
| 583 | func (d *DotGit) incomingObjectPath(h plumbing.Hash) string { |
| 584 | hString := h.String() |
| 585 | |
| 586 | if d.incomingDirName == "" { |
| 587 | return d.fs.Join(objectsPath, hString[0:2], hString[2:hash.HexSize]) |
| 588 | } |
| 589 | |
| 590 | return d.fs.Join(objectsPath, d.incomingDirName, hString[0:2], hString[2:hash.HexSize]) |
| 591 | } |
| 592 | |
| 593 | // hasIncomingObjects searches for an incoming directory and keeps its name |
| 594 | // so it doesn't have to be found each time an object is accessed. |
no test coverage detected