Skip to content

Commit

Permalink
Merge pull request #1227 from rsteube/git-sparsecheckout
Browse files Browse the repository at this point in the history
git: sparse-checkout
  • Loading branch information
rsteube authored Jul 10, 2022
2 parents 12d1674 + b1aca7d commit 660d610
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 17 deletions.
18 changes: 18 additions & 0 deletions completers/git_completer/cmd/sparseCheckout.go
Original file line number Diff line number Diff line change
@@ -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)
}
22 changes: 22 additions & 0 deletions completers/git_completer/cmd/sparseCheckout_add.go
Original file line number Diff line number Diff line change
@@ -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(),
)
}
18 changes: 18 additions & 0 deletions completers/git_completer/cmd/sparseCheckout_disable.go
Original file line number Diff line number Diff line change
@@ -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)
}
18 changes: 18 additions & 0 deletions completers/git_completer/cmd/sparseCheckout_list.go
Original file line number Diff line number Diff line change
@@ -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)
}
18 changes: 18 additions & 0 deletions completers/git_completer/cmd/sparseCheckout_reapply.go
Original file line number Diff line number Diff line change
@@ -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)
}
22 changes: 22 additions & 0 deletions completers/git_completer/cmd/sparseCheckout_set.go
Original file line number Diff line number Diff line change
@@ -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(),
)
}
17 changes: 0 additions & 17 deletions completers/git_completer/cmd/sparse_checkout_generated.go

This file was deleted.

0 comments on commit 660d610

Please sign in to comment.