-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
merge.go
27 lines (22 loc) · 937 Bytes
/
merge.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 mergeCmd = &cobra.Command{
Use: "merge [OPTIONS] [REVISIONS]...",
Short: "Merge work from multiple branches",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(mergeCmd).Standalone()
mergeCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
mergeCmd.Flags().BoolP("insert-after", "A", false, "Insert the new change between the target commit(s) and their children")
mergeCmd.Flags().BoolP("insert-before", "B", false, "Insert the new change between the target commit(s) and their parents")
mergeCmd.Flags().StringSliceP("message", "m", []string{}, "The change description to use")
rootCmd.AddCommand(mergeCmd)
carapace.Gen(mergeCmd).PositionalAnyCompletion(
jj.ActionRevs(jj.RevOption{}.Default()).FilterArgs(),
)
}