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