NewCommand creates a new 'git-lfs' sub command, given a command name and command run function. Each command will initialize the local storage ('.git/lfs') directory when run, unless the PreRun hook is set to nil.
(name string, runFn func(*cobra.Command, []string))
| 29 | // Each command will initialize the local storage ('.git/lfs') directory when |
| 30 | // run, unless the PreRun hook is set to nil. |
| 31 | func NewCommand(name string, runFn func(*cobra.Command, []string)) *cobra.Command { |
| 32 | return &cobra.Command{Use: name, Run: runFn, PreRun: setupHTTPLogger} |
| 33 | } |
| 34 | |
| 35 | // RegisterCommand creates a direct 'git-lfs' subcommand, given a command name, |
| 36 | // a command run function, and an optional callback during the command |