This commit is contained in:
anqiansong
2022-03-05 22:52:32 +08:00
committed by GitHub
parent 08a8bd7ef7
commit 68a81fea8a
11 changed files with 95 additions and 20 deletions

View File

@@ -33,8 +33,9 @@ func RPC(c *cli.Context) error {
goOptions := c.StringSlice("go_opt")
home := c.String("home")
remote := c.String("remote")
branch := c.String("branch")
if len(remote) > 0 {
repo, _ := util.CloneIntoGitHome(remote)
repo, _ := util.CloneIntoGitHome(remote, branch)
if len(repo) > 0 {
home = repo
}
@@ -89,8 +90,9 @@ func RPCNew(c *cli.Context) error {
style := c.String("style")
home := c.String("home")
remote := c.String("remote")
branch := c.String("branch")
if len(remote) > 0 {
repo, _ := util.CloneIntoGitHome(remote)
repo, _ := util.CloneIntoGitHome(remote, branch)
if len(repo) > 0 {
home = repo
}
@@ -124,8 +126,9 @@ func RPCTemplate(c *cli.Context) error {
protoFile := c.String("o")
home := c.String("home")
remote := c.String("remote")
branch := c.String("branch")
if len(remote) > 0 {
repo, _ := util.CloneIntoGitHome(remote)
repo, _ := util.CloneIntoGitHome(remote, branch)
if len(repo) > 0 {
home = repo
}