MCPcopy Create free account
hub / github.com/go-git/go-git / CloneOptions

Struct CloneOptions

options.go:38–90  ·  view source on GitHub ↗

CloneOptions describes how a clone should be performed.

Source from the content-addressed store, hash-verified

36
37// CloneOptions describes how a clone should be performed.
38type CloneOptions struct {
39 // The (possibly remote) repository URL to clone from.
40 URL string
41 // Auth credentials, if required, to use with the remote repository.
42 Auth transport.AuthMethod
43 // Name of the remote to be added, by default `origin`.
44 RemoteName string
45 // Remote branch to clone.
46 ReferenceName plumbing.ReferenceName
47 // Fetch only ReferenceName if true.
48 SingleBranch bool
49 // Mirror clones the repository as a mirror.
50 //
51 // Compared to a bare clone, mirror not only maps local branches of the
52 // source to local branches of the target, it maps all refs (including
53 // remote-tracking branches, notes etc.) and sets up a refspec configuration
54 // such that all these refs are overwritten by a git remote update in the
55 // target repository.
56 Mirror bool
57 // No checkout of HEAD after clone if true.
58 NoCheckout bool
59 // Limit fetching to the specified number of commits.
60 Depth int
61 // RecurseSubmodules after the clone is created, initialize all submodules
62 // within, using their default settings. This option is ignored if the
63 // cloned repository does not have a worktree.
64 RecurseSubmodules SubmoduleRescursivity
65 // ShallowSubmodules limit cloning submodules to the 1 level of depth.
66 // It matches the git command --shallow-submodules.
67 ShallowSubmodules bool
68 // Progress is where the human readable information sent by the server is
69 // stored, if nil nothing is stored and the capability (if supported)
70 // no-progress, is sent to the server to avoid send this information.
71 Progress sideband.Progress
72 // Tags describe how the tags will be fetched from the remote repository,
73 // by default is AllTags.
74 Tags TagMode
75 // InsecureSkipTLS skips ssl verify if protocol is https
76 InsecureSkipTLS bool
77 // CABundle specify additional ca bundle with system cert pool
78 CABundle []byte
79 // ProxyOptions provides info required for connecting to a proxy.
80 ProxyOptions transport.ProxyOptions
81 // When the repository to clone is on the local machine, instead of
82 // using hard links, automatically setup .git/objects/info/alternates
83 // to share the objects with the source repository.
84 // The resulting repository starts out without any object of its own.
85 // NOTE: this is a possibly dangerous operation; do not use it unless
86 // you understand what it does.
87 //
88 // [Reference]: https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---shared
89 Shared bool
90}
91
92// MergeOptions describes how a merge should be performed.
93type MergeOptions struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected