MCPcopy Create free account
hub / github.com/entireio/git-sync / excludeRefPrefixFlag

Function excludeRefPrefixFlag

cmd/git-sync/flags.go:58–62  ·  view source on GitHub ↗

excludeRefPrefixFlag registers --exclude-ref-prefix. Repeatable; each prefix is matched as a string prefix against ref names (e.g. "refs/pull/" trims GitHub PR refs under --all-refs).

(cmd *cobra.Command, prefixes *[]string)

Source from the content-addressed store, hash-verified

56// prefix is matched as a string prefix against ref names (e.g.
57// "refs/pull/" trims GitHub PR refs under --all-refs).
58func excludeRefPrefixFlag(cmd *cobra.Command, prefixes *[]string) {
59 cmd.Flags().StringArrayVar(prefixes, "exclude-ref-prefix", nil,
60 "exclude refs whose names start with this prefix; repeatable. "+
61 "Subtracts from auto-discovery (branches/tags/--all-refs); explicit --map values are not subject to this filter")
62}
63
64// allRefsFlag registers --all-refs with the supplied usage string and
65// bundles its implications. Each pointer in implies is set to true when

Callers 5

newSyncLikeCmdFunction · 0.85
newProbeCmdFunction · 0.85
newFetchCmdFunction · 0.85
newBootstrapCmdFunction · 0.85
newConvertSHA256CmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected