remove signoff in push

I just realized that's not a thing

Signed-off-by: daveberrys <daveberry@blueson.tech>
This commit is contained in:
daveberry committed 2026-11-12 16:41:51 +08:00
1 parent e89cc16ace
commit 793c8f1c00
1 file changed
+3 -8
+3 -8
View File
@@ -17,16 +17,14 @@ func init() { cmd.RootCmd.AddCommand(pushCmd) }
var pushCmd = &cobra.Command{ var pushCmd = &cobra.Command{
Use: "push [force:opt] [remote:opt] [signoff:opt]", Use: "push [force:opt] [remote:opt] [signoff:opt]",
Short: "Add current changes and push", Short: "Add current changes and push",
Args: cobra.MaximumNArgs(3), Args: cobra.MaximumNArgs(2),
RunE: func(cobraCmd *cobra.Command, args []string) error { RunE: func(cobraCmd *cobra.Command, args []string) error {
branch, _ := utils.RunGit(true, "rev-parse", "--abbrev-ref", "HEAD") branch, _ := utils.RunGit(true, "rev-parse", "--abbrev-ref", "HEAD")
force, remote, signoff := false, "", false force, remote := false, ""
for _, arg := range args { for _, arg := range args {
if arg == "force" { if arg == "force" {
force = true force = true
} else if arg == "" {
signoff = true
} else if remote == "" { } else if remote == "" {
remote = arg remote = arg
} else { } else {
@@ -52,13 +50,10 @@ var pushCmd = &cobra.Command{
}, },
} }
func pushArgs(force, signoff bool, tail ...string) []string { func pushArgs(force bool, tail ...string) []string {
args := []string{"push"} args := []string{"push"}
if force { if force {
args = append(args, "--force") args = append(args, "--force")
} }
if signoff {
args = append(args, "--signoff")
}
return append(args, tail...) return append(args, tail...)
} }