Remove init option
Why would you not use it
This commit is contained in:
6
main.go
6
main.go
@@ -66,13 +66,11 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var name string
|
var name string
|
||||||
var private, init, forceInit bool
|
var private, forceInit bool
|
||||||
flag.StringVar(&name, "name", "", "Name of the repository")
|
flag.StringVar(&name, "name", "", "Name of the repository")
|
||||||
flag.StringVar(&name, "n", "", "Name of the repository (shorthand)")
|
flag.StringVar(&name, "n", "", "Name of the repository (shorthand)")
|
||||||
flag.BoolVar(&private, "private", false, "Make the repository private")
|
flag.BoolVar(&private, "private", false, "Make the repository private")
|
||||||
flag.BoolVar(&private, "p", false, "Make the repository private (shorthand)")
|
flag.BoolVar(&private, "p", false, "Make the repository private (shorthand)")
|
||||||
flag.BoolVar(&init, "init", false, "Also add remote to the new repo")
|
|
||||||
flag.BoolVar(&init, "i", false, "Also add remote to the new repo (shorthand)")
|
|
||||||
flag.BoolVar(&forceInit, "f", false, "Force assignment of the remote (deletes existing origin)")
|
flag.BoolVar(&forceInit, "f", false, "Force assignment of the remote (deletes existing origin)")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
@@ -110,7 +108,6 @@ func main() {
|
|||||||
clipboard.Write(clipboard.FmtText, []byte(repo.CloneURL))
|
clipboard.Write(clipboard.FmtText, []byte(repo.CloneURL))
|
||||||
}
|
}
|
||||||
|
|
||||||
if init {
|
|
||||||
cwd, err := os.Getwd()
|
cwd, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Error.Fatalf("Error getting current working directory: %v", err)
|
Error.Fatalf("Error getting current working directory: %v", err)
|
||||||
@@ -157,4 +154,3 @@ func main() {
|
|||||||
}
|
}
|
||||||
log.Printf("Remote added to local repository")
|
log.Printf("Remote added to local repository")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user