Hooks
Index
Properties
Properties
optionalfetchHostedRepository
Type declaration
Called when a Git repository is fetched. If the function returns
null
the repository will be cloned and packed; otherwise, it must returns a value compatible with what a fetcher would return.The main use case for this hook is to let you implement smarter cloning strategies depending on the hosting platform. For instance, GitHub supports downloading repository tarballs, which are more efficient than cloning the repository (even without its history).
Parameters
current: null | FetchResult
locator: Locator
opts: FetchOptions
Returns Promise<null | FetchResult>
Called when a Git repository is fetched. If the function returns
null
the repository will be cloned and packed; otherwise, it must returns a value compatible with what a fetcher would return.The main use case for this hook is to let you implement smarter cloning strategies depending on the hosting platform. For instance, GitHub supports downloading repository tarballs, which are more efficient than cloning the repository (even without its history).