code: func RegisterCommand(name string, runFn func(cmd *cobra.Command, args []string), fn func(cmd *cobra.Command)) {
  	commandMu.Lock()
  	commandFuncs = append(commandFuncs, func() *cobra.Command {
  		cmd := NewCommand(name, runFn)
  		if fn != nil {
  			fn(cmd)
  		}
  		return cmd
  	})
  	commandMu.Unlock()
  }
docs: // RegisterCommand creates a direct 'git-lfs' subcommand, given a command name,
  // a command run function, and an optional callback during the command
  // initialization process.
  //
  // The 'git-lfs' command initialization is deferred until the `commands.Run()`
  // function is called. The fn callback is passed the output from NewCommand,
  // and gives the caller the flexibility to customize the command by adding
  // flags, tweaking command hooks, etc.