-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
backout.go
27 lines (22 loc) · 887 Bytes
/
backout.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj"
"github.com/spf13/cobra"
)
var backoutCmd = &cobra.Command{
Use: "backout",
Short: "Apply the reverse of a revision on top of another revision",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(backoutCmd).Standalone()
backoutCmd.Flags().StringSliceP("destination", "d", []string{}, "The revision to apply the reverse changes on top of")
backoutCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
backoutCmd.Flags().StringP("revision", "r", "", "The revision to apply the reverse of")
rootCmd.AddCommand(backoutCmd)
carapace.Gen(backoutCmd).FlagCompletion(carapace.ActionMap{
"destination": jj.ActionRevs(jj.RevOption{}.Default()),
"revision": jj.ActionRevs(jj.RevOption{}.Default()),
})
}