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

Function defaultOperationMode

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

defaultOperationMode returns the starting value for the --mode flag. Subcommands that pin a mode (sync, replicate) pass it in; plan passes "" and gets sync as the default, letting --mode override it.

(defaultMode gitsync.OperationMode)

Source from the content-addressed store, hash-verified

152// Subcommands that pin a mode (sync, replicate) pass it in; plan passes ""
153// and gets sync as the default, letting --mode override it.
154func defaultOperationMode(defaultMode gitsync.OperationMode) operationMode {
155 if defaultMode != "" {
156 return operationMode(defaultMode)
157 }
158 return operationMode(gitsync.ModeSync)
159}

Callers 1

newSyncLikeCmdFunction · 0.85

Calls 1

operationModeTypeAlias · 0.85

Tested by

no test coverage detected