commands: add 'import' git-lfs-migrate(1) subcommand
This commit is contained in:
parent
cdd17d024e
commit
9916dedd26
@ -211,6 +211,8 @@ func init() {
|
|||||||
info.Flags().StringVar(&migrateInfoAboveFmt, "above", "1mb", "--above=<n>")
|
info.Flags().StringVar(&migrateInfoAboveFmt, "above", "1mb", "--above=<n>")
|
||||||
info.Flags().StringVar(&migrateInfoUnitFmt, "unit", "", "--unit=<unit>")
|
info.Flags().StringVar(&migrateInfoUnitFmt, "unit", "", "--unit=<unit>")
|
||||||
|
|
||||||
|
importCmd := NewCommand("import", migrateImportCommand)
|
||||||
|
|
||||||
RegisterCommand("migrate", nil, func(cmd *cobra.Command) {
|
RegisterCommand("migrate", nil, func(cmd *cobra.Command) {
|
||||||
// Adding flags directly to cmd.Flags() doesn't apply those
|
// Adding flags directly to cmd.Flags() doesn't apply those
|
||||||
// flags to any subcommands of the root. Therefore, loop through
|
// flags to any subcommands of the root. Therefore, loop through
|
||||||
@ -221,7 +223,7 @@ func init() {
|
|||||||
// `git-lfs-migrate(1)` command as a subcommand (child).
|
// `git-lfs-migrate(1)` command as a subcommand (child).
|
||||||
|
|
||||||
for _, subcommand := range []*cobra.Command{
|
for _, subcommand := range []*cobra.Command{
|
||||||
info,
|
importCmd, info,
|
||||||
} {
|
} {
|
||||||
subcommand.Flags().StringVarP(&includeArg, "include", "I", "", "Include a list of paths")
|
subcommand.Flags().StringVarP(&includeArg, "include", "I", "", "Include a list of paths")
|
||||||
subcommand.Flags().StringVarP(&excludeArg, "exclude", "X", "", "Exclude a list of paths")
|
subcommand.Flags().StringVarP(&excludeArg, "exclude", "X", "", "Exclude a list of paths")
|
||||||
|
7
commands/command_migrate_import.go
Normal file
7
commands/command_migrate_import.go
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package commands
|
||||||
|
|
||||||
|
import "github.com/spf13/cobra"
|
||||||
|
|
||||||
|
func migrateImportCommand(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user