buf: github.com/bufbuild/buf/internal/pkg/storage/storagegit Index | Files

package storagegit

import "github.com/bufbuild/buf/internal/pkg/storage/storagegit"

Package storagegit implements git utilities.

This uses https://github.com/src-d/go-git.

Index

Package Files

storagegit.go

func Clone Uses

func Clone(
    ctx context.Context,
    logger *zap.Logger,
    gitURL string,
    gitBranch string,
    bucket storage.Bucket,
    options ...storagepath.TransformerOption,
) error

Clone clones the url into the bucket.

This is roughly equivalent to git clone --branch gitBranch --single-branch --depth 1 gitUrl. Only regular files are added to the bucket.

Branch is required.

This really needs more testing and cleanup Only use for local CLI checking

Package storagegit imports 17 packages (graph). Updated 2019-12-13. Refresh now. Tools for package owners.