示例#1
0
func (p *Project) fetch(remote *git.Remote, refspecs ...string) (err error) {
	opts := &git.FetchOptions{
		RemoteCallbacks: remoteCallbacks,
	}

	// fetch with default reflog message
	err = remote.Fetch(refspecs, opts, "")
	if err != nil {
		return fmt.Errorf("Failed to fetch: %v", err)
	}
	return
}