Skip to content

Commit

Permalink
Merge pull request #1932 from rsteube/git-checkrefformat
Browse files Browse the repository at this point in the history
git: check-ref-format
  • Loading branch information
rsteube authored Oct 29, 2023
2 parents 313fa85 + ff4fa02 commit 1587c86
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
24 changes: 24 additions & 0 deletions completers/git_completer/cmd/checkRefFormat.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var checkRefFormatCmd = &cobra.Command{
Use: "check-ref-format",
Short: "Ensures that a reference name is well formed",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groups[group_low_level_helper].ID,
}

func init() {
carapace.Gen(checkRefFormatCmd).Standalone()

checkRefFormatCmd.Flags().Bool("allow-onelevel", false, "Controls whether one-level refnames are accepted")
checkRefFormatCmd.Flags().Bool("branch", false, "Check for valid branch name")
checkRefFormatCmd.Flags().Bool("no-allow-onelevel", false, "Controls whether one-level refnames are accepted")
checkRefFormatCmd.Flags().Bool("normalize", false, "Normalize refname by removing any leading slash characters")
checkRefFormatCmd.Flags().Bool("refspec-pattern", false, "Interpret <refname> as a reference name pattern for a refspec")
rootCmd.AddCommand(checkRefFormatCmd)
}
19 changes: 0 additions & 19 deletions completers/git_completer/cmd/check_ref_format_generated.go

This file was deleted.

0 comments on commit 1587c86

Please sign in to comment.