From b1aca7d5ec51dae1715a9154991d1f58b9302c56 Mon Sep 17 00:00:00 2001 From: rsteube Date: Sun, 10 Jul 2022 15:52:06 +0200 Subject: [PATCH] git: sparse-checkout --- .../git_completer/cmd/sparseCheckout.go | 18 +++++++++++++++ .../git_completer/cmd/sparseCheckout_add.go | 22 +++++++++++++++++++ .../cmd/sparseCheckout_disable.go | 18 +++++++++++++++ .../git_completer/cmd/sparseCheckout_list.go | 18 +++++++++++++++ .../cmd/sparseCheckout_reapply.go | 18 +++++++++++++++ .../git_completer/cmd/sparseCheckout_set.go | 22 +++++++++++++++++++ .../cmd/sparse_checkout_generated.go | 17 -------------- 7 files changed, 116 insertions(+), 17 deletions(-) create mode 100644 completers/git_completer/cmd/sparseCheckout.go create mode 100644 completers/git_completer/cmd/sparseCheckout_add.go create mode 100644 completers/git_completer/cmd/sparseCheckout_disable.go create mode 100644 completers/git_completer/cmd/sparseCheckout_list.go create mode 100644 completers/git_completer/cmd/sparseCheckout_reapply.go create mode 100644 completers/git_completer/cmd/sparseCheckout_set.go delete mode 100644 completers/git_completer/cmd/sparse_checkout_generated.go diff --git a/completers/git_completer/cmd/sparseCheckout.go b/completers/git_completer/cmd/sparseCheckout.go new file mode 100644 index 0000000000..9529ff6719 --- /dev/null +++ b/completers/git_completer/cmd/sparseCheckout.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var sparseCheckoutCmd = &cobra.Command{ + Use: "sparse-checkout", + Short: "Initialize and modify the sparse-checkout", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(sparseCheckoutCmd).Standalone() + + rootCmd.AddCommand(sparseCheckoutCmd) +} diff --git a/completers/git_completer/cmd/sparseCheckout_add.go b/completers/git_completer/cmd/sparseCheckout_add.go new file mode 100644 index 0000000000..d961f4825f --- /dev/null +++ b/completers/git_completer/cmd/sparseCheckout_add.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var sparseCheckout_addCmd = &cobra.Command{ + Use: "add", + Short: "Add all files under SOME/DIR/ECTORY/ (at any depth) to the sparse checkout", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(sparseCheckout_addCmd).Standalone() + + sparseCheckoutCmd.AddCommand(sparseCheckout_addCmd) + + carapace.Gen(sparseCheckout_addCmd).PositionalAnyCompletion( + carapace.ActionDirectories(), + ) +} diff --git a/completers/git_completer/cmd/sparseCheckout_disable.go b/completers/git_completer/cmd/sparseCheckout_disable.go new file mode 100644 index 0000000000..fb3777ad5d --- /dev/null +++ b/completers/git_completer/cmd/sparseCheckout_disable.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var sparseCheckout_disableCmd = &cobra.Command{ + Use: "disable", + Short: "Repopulate the working directory with all files, disabling sparse checkouts", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(sparseCheckout_disableCmd).Standalone() + + sparseCheckoutCmd.AddCommand(sparseCheckout_disableCmd) +} diff --git a/completers/git_completer/cmd/sparseCheckout_list.go b/completers/git_completer/cmd/sparseCheckout_list.go new file mode 100644 index 0000000000..5bedbdc84b --- /dev/null +++ b/completers/git_completer/cmd/sparseCheckout_list.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var sparseCheckout_listCmd = &cobra.Command{ + Use: "list", + Short: "Describe the directories or patterns in the sparse-checkout file", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(sparseCheckout_listCmd).Standalone() + + sparseCheckoutCmd.AddCommand(sparseCheckout_listCmd) +} diff --git a/completers/git_completer/cmd/sparseCheckout_reapply.go b/completers/git_completer/cmd/sparseCheckout_reapply.go new file mode 100644 index 0000000000..3d11fb0f95 --- /dev/null +++ b/completers/git_completer/cmd/sparseCheckout_reapply.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var sparseCheckout_reapplyCmd = &cobra.Command{ + Use: "reapply", + Short: "Reapply the existing sparse directory specifications", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(sparseCheckout_reapplyCmd).Standalone() + + sparseCheckoutCmd.AddCommand(sparseCheckout_reapplyCmd) +} diff --git a/completers/git_completer/cmd/sparseCheckout_set.go b/completers/git_completer/cmd/sparseCheckout_set.go new file mode 100644 index 0000000000..e6d61e5ccf --- /dev/null +++ b/completers/git_completer/cmd/sparseCheckout_set.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var sparseCheckout_setCmd = &cobra.Command{ + Use: "set", + Short: "Enable the necessary sparse-checkout config settings", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(sparseCheckout_setCmd).Standalone() + + sparseCheckoutCmd.AddCommand(sparseCheckout_setCmd) + + carapace.Gen(sparseCheckout_setCmd).PositionalAnyCompletion( + carapace.ActionDirectories(), + ) +} diff --git a/completers/git_completer/cmd/sparse_checkout_generated.go b/completers/git_completer/cmd/sparse_checkout_generated.go deleted file mode 100644 index 33195091a8..0000000000 --- a/completers/git_completer/cmd/sparse_checkout_generated.go +++ /dev/null @@ -1,17 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" -) - -var sparse_checkoutCmd = &cobra.Command{ - Use: "sparse-checkout", - Short: "Initialize and modify the sparse-checkout", - Run: func(cmd *cobra.Command, args []string) { - }, -} - -func init() { - - rootCmd.AddCommand(sparse_checkoutCmd) -}