From 9916dedd266cb1f0af9feb43ee8dbbd81a551573 Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Wed, 21 Jun 2017 10:43:56 -0600 Subject: [PATCH] commands: add 'import' git-lfs-migrate(1) subcommand --- commands/command_migrate.go | 4 +++- commands/command_migrate_import.go | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 commands/command_migrate_import.go diff --git a/commands/command_migrate.go b/commands/command_migrate.go index d532ec4f..ffc4694f 100644 --- a/commands/command_migrate.go +++ b/commands/command_migrate.go @@ -211,6 +211,8 @@ func init() { info.Flags().StringVar(&migrateInfoAboveFmt, "above", "1mb", "--above=") info.Flags().StringVar(&migrateInfoUnitFmt, "unit", "", "--unit=") + importCmd := NewCommand("import", migrateImportCommand) + RegisterCommand("migrate", nil, func(cmd *cobra.Command) { // Adding flags directly to cmd.Flags() doesn't apply those // 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). for _, subcommand := range []*cobra.Command{ - info, + importCmd, info, } { subcommand.Flags().StringVarP(&includeArg, "include", "I", "", "Include a list of paths") subcommand.Flags().StringVarP(&excludeArg, "exclude", "X", "", "Exclude a list of paths") diff --git a/commands/command_migrate_import.go b/commands/command_migrate_import.go new file mode 100644 index 00000000..9baca560 --- /dev/null +++ b/commands/command_migrate_import.go @@ -0,0 +1,7 @@ +package commands + +import "github.com/spf13/cobra" + +func migrateImportCommand(cmd *cobra.Command, args []string) { + +}