Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFileNotFoundInCache = errors.New("git object id does not exist in repository, file might be untracked or modified")
Functions ¶
This section is empty.
Types ¶
type Calc ¶
type Calc struct {
// contains filtered or unexported fields
}
Calc calculates git object IDs for files. Object IDs are read the first time a digest is requested from the git repository.
func (*Calc) File ¶
File returns a git object ID as digest for the the file at absPath. If it exist in the cached object ids read from the git repository, it is returned. Otherwise it is calculated.
func (*Calc) FileDigestFromCache ¶
FileDigestFromCache looks up the git object id in the cached objects from the git repository. If it is not found ErrFileNotFoundInCache is returned.
On the first call of this function, the git object IDs are loaded from the git repository.
Click to show internal directories.
Click to hide internal directories.