clone

package
v0.0.0-...-7035aaa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(ctx context.Context, repo, dir string, options ...Option) error

Exec runs `git clone` using the os/exec standard library package.

Types

type ConfigKV

type ConfigKV struct {
	Key   string
	Value string
}

type Option

type Option func(o *execOptions)

func WithAlsoFilterSubmodules

func WithAlsoFilterSubmodules(alsoFilterSubModules bool) Option

WithAlsoFilterSubmodules sets the --also-filter-submodules flag .For usage Refs :https://git-scm.com/docs/git-clone

func WithBare

func WithBare(bare bool) Option

WithBare sets the --bare flag

func WithBranch

func WithBranch(branch string) Option

WithBranch sets the --branch <name> flag

func WithConfig

func WithConfig(config []ConfigKV) Option

WithConfig sets the --config <key>=<value> flag for every key/value pair

func WithDepth

func WithDepth(depth int) Option

WithDepth sets the --depth <depth> flag

func WithDissociate

func WithDissociate(dissociate bool) Option

WithDissociate sets the --dissociate flag

func WithFilter

func WithFilter(filter string) Option

Withfilter sets the --filter <filter> flag

func WithJobs

func WithJobs(jobs int) Option

WithJobs sets the --jobs <jobs> flag

func WithLocal

func WithLocal(local bool) Option

WithLocal sets the --local flag

func WithMirror

func WithMirror(mirror bool) Option

WithMirror sets the --mirror flag

func WithNoCheckout

func WithNoCheckout(noCheckout bool) Option

WithNoCheckout sets the --no-checkout flag

func WithNoHardLinks(noHardLinks bool) Option

WithNoHardLinks sets the --no-hardlinks flag

func WithNoRejectShallow

func WithNoRejectShallow(noRejectShallow bool) Option

WithNoRejectShallow sets the --no-reject-shallow flag

func WithNoRemoteSubmodules

func WithNoRemoteSubmodules(noRemoteSubmodules bool) Option

WithNoRemoteSubmodules sets the --no-remote-submodules flag

func WithNoShallowSubmodules

func WithNoShallowSubmodules(noShallowSubmodules bool) Option

WithNoShallowSubmodules sets the --no-shallow-submodules flag

func WithNoSingleBranch

func WithNoSingleBranch(noSingleBranch bool) Option

WithNoSingleBranch sets the --no-single-branch flag

func WithNoTags

func WithNoTags(noTags bool) Option

WithNoTags sets the --no-tags flag

func WithOrigin

func WithOrigin(origin string) Option

WithOrigin sets the --origin <name> flag

func WithProgress

func WithProgress(progress bool) Option

WithProgress sets the --progress flag

func WithQuiet

func WithQuiet(quiet bool) Option

WithQuiet sets the --quiet flag

func WithRecurseSubmodules

func WithRecurseSubmodules(recurseSubmodules string) Option

WithRecurseSubmodules sets the --recurse-modules <pathspec> flag

func WithReference

func WithReference(reference string) Option

WithReference sets the --reference <repository> flag

func WithReferenceIfAble

func WithReferenceIfAble(referenceIfAble string) Option

WithReferenceIfAble sets the --reference-if-able <repository> flag

func WithRejectShallow

func WithRejectShallow(rejectShallow bool) Option

WithRejectShallow sets the --reject-shallow flag

func WithRemoteSubmodules

func WithRemoteSubmodules(remoteSubmodules bool) Option

WithRemoteSubmodules sets the --remote-submodules flag

func WithSeparateGitDir

func WithSeparateGitDir(separateGitDir string) Option

WithSeparateGitDir sets the --separate-git-dir <dir> flag

func WithServerOptions

func WithServerOptions(ServerOptions []string) Option

WithServerOptions sets the --server-option <option> flag

func WithShallowExclude

func WithShallowExclude(shallowExclude []string) Option

WithShallowExclude sets the --shallow-exclude <revision> flag

func WithShallowSince

func WithShallowSince(shallowSince string) Option

WithShallowSince sets the --shallow-since <date> flag

func WithShallowSubmodules

func WithShallowSubmodules(shallowSubmodules bool) Option

WithShallowSubmodules sets the --shallow-submodules flag

func WithShared

func WithShared(shared bool) Option

WithShared sets the --shared flag

func WithSingleBranch

func WithSingleBranch(singleBranch bool) Option

WithSingleBranch sets the --single-branch flag

func WithSparse

func WithSparse(sparse bool) Option

WithSparse sets the --sparse flag

func WithTemplate

func WithTemplate(template string) Option

WithTemplate sets the --template <template-dir> flag

func WithUploadPack

func WithUploadPack(uploadPack string) Option

WithUploadPack sets the --upload-pack <dir> flag

func WithVerbose

func WithVerbose(verbose bool) Option

WithVerbose sets the --verbose flag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL