X Tutup
Skip to content

Commit 14de70a

Browse files
author
vilmibm
authored
add defaultRemoteName
1 parent 395355d commit 14de70a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/cmd/repo/fork/fork.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import (
2222
"github.com/spf13/pflag"
2323
)
2424

25+
const defaultRemoteName = "origin"
26+
2527
type ForkOptions struct {
2628
HttpClient func() (*http.Client, error)
2729
Config func() (config.Config, error)
@@ -110,7 +112,7 @@ Additional 'git clone' flags can be passed in by listing them after '--'.`,
110112

111113
cmd.Flags().BoolVar(&opts.Clone, "clone", false, "Clone the fork {true|false}")
112114
cmd.Flags().BoolVar(&opts.Remote, "remote", false, "Add remote for fork {true|false}")
113-
cmd.Flags().StringVar(&opts.RemoteName, "remote-name", "origin", "Specify a name for a fork's new remote.")
115+
cmd.Flags().StringVar(&opts.RemoteName, "remote-name", defaultRemoteName, "Specify a name for a fork's new remote.")
114116
cmd.Flags().StringVar(&opts.Organization, "org", "", "Create the fork in an organization")
115117

116118
return cmd

0 commit comments

Comments
 (0)
X Tutup