-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var refsCmd = &cobra.Command{ | ||
Use: "refs", | ||
Short: "Low-level access to refs", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
GroupID: groups[group_manipulator].ID, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(refsCmd).Standalone() | ||
|
||
rootCmd.AddCommand(refsCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var refs_migrateCmd = &cobra.Command{ | ||
Use: "migrate", | ||
Short: "Migrate ref store between different formats", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(refs_migrateCmd).Standalone() | ||
|
||
refs_migrateCmd.Flags().Bool("dry-run", false, "perform the migration, but do not modify the repository") | ||
refs_migrateCmd.Flags().String("ref-format", "", "the ref format to migrate the ref store to") | ||
refsCmd.AddCommand(refs_migrateCmd) | ||
|
||
carapace.Gen(refs_migrateCmd).FlagCompletion(carapace.ActionMap{ | ||
"ref-format": carapace.ActionValuesDescribed( | ||
"files", "loose files with packed-refs", | ||
"reftable", "reftable format", | ||
), | ||
}) | ||
} |