Skip to content

Commit f66e7f5

Browse files
authored
feat(clone): add no-tags flag (#10)
1 parent 3b5bf04 commit f66e7f5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

clone/clone_gen.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ func NoSingleBranch(g *types.Cmd) {
8484
g.AddOptions("--no-single-branch")
8585
}
8686

87+
// NoTags Don’t clone any tags, and set remote.<remote>.tagOpt=--no-tags in the config, ensuring that future git pull and git fetch operations won’t follow any tags. Subsequent explicit tag fetches will still work,
88+
// --no-tags
89+
func NoTags(g *types.Cmd) {
90+
g.AddOptions("--no-tags")
91+
}
92+
8793
// Origin Instead of using the remote name origin to keep track of the upstream repository, use <name>.
8894
// --origin <name>, -o <name>
8995
func Origin(name string) func(*types.Cmd) {

internal/descriptions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,11 @@
923923
"argument": "--jobs <n>",
924924
"arguments": "-j <n>, --jobs <n>",
925925
"description": "The number of submodules fetched at the same time. Defaults to the submodule.fetchJobs option."
926+
},
927+
{
928+
"argument": "--no-tags",
929+
"arguments": "--no-tags",
930+
"description": "Don’t clone any tags, and set remote.<remote>.tagOpt=--no-tags in the config, ensuring that future git pull and git fetch operations won’t follow any tags. Subsequent explicit tag fetches will still work,"
926931
}
927932
]
928933
},

0 commit comments

Comments
 (0)