mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-14 11:44:32 +00:00
25 lines
858 B
Go
25 lines
858 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/rsteube/carapace"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var update_refCmd = &cobra.Command{
|
|
Use: "update-ref",
|
|
Short: "Update the object name stored in a ref safely",
|
|
Run: func(cmd *cobra.Command, args []string) {},
|
|
GroupID: groups[group_low_level_manipulator].ID,
|
|
}
|
|
|
|
func init() {
|
|
carapace.Gen(update_refCmd).Standalone()
|
|
update_refCmd.Flags().Bool("create-reflog", false, "create a reflog")
|
|
update_refCmd.Flags().BoolS("d", "d", false, "delete the reference")
|
|
update_refCmd.Flags().StringS("m", "m", "", "reason of the update")
|
|
update_refCmd.Flags().Bool("no-deref", false, "update <refname> not the one it points to")
|
|
update_refCmd.Flags().Bool("stdin", false, "read updates from stdin")
|
|
update_refCmd.Flags().BoolS("z", "z", false, "stdin has NUL-terminated arguments")
|
|
rootCmd.AddCommand(update_refCmd)
|
|
}
|