Skip to content

Commit

Permalink
Merge pull request #2491 from carapace-sh/git-name-rev
Browse files Browse the repository at this point in the history
git: name-rev
  • Loading branch information
rsteube authored Aug 15, 2024
2 parents 8db19f1 + 0269c84 commit 21c25ed
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
27 changes: 27 additions & 0 deletions completers/git_completer/cmd/nameRev.go
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 nameRevCmd = &cobra.Command{
Use: "name-rev",
Short: "Find symbolic names for given revs",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groups[group_low_level_interrogator].ID,
}

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

nameRevCmd.Flags().Bool("all", false, "list all commits reachable from all refs")
nameRevCmd.Flags().Bool("always", false, "show uniquely abbreviated commit object as fallback")
nameRevCmd.Flags().Bool("annotate-stdin", false, "transform stdin by substituting all the 40-character SHA-1 hexes")
nameRevCmd.Flags().String("exclude", "", "do not use any ref whose name matches a given shell pattern")
nameRevCmd.Flags().Bool("name-only", false, "print only the name")
nameRevCmd.Flags().Bool("no-undefined", false, "die with error code != 0 when a reference is undefined")
nameRevCmd.Flags().String("refs", "", "only use refs whose names match a given shell pattern")
nameRevCmd.Flags().Bool("tags", false, "only use tags to name the commits")
rootCmd.AddCommand(nameRevCmd)
}
26 changes: 0 additions & 26 deletions completers/git_completer/cmd/name_rev_generated.go

This file was deleted.

0 comments on commit 21c25ed

Please sign in to comment.