提交 2a168c39 编写于 作者: T Theodore Kokkoris 提交者: Jingwen Owen Ou

Changed variable names

上级 d5c3fb87
...@@ -31,9 +31,9 @@ func push (command *Command, args *Args) { ...@@ -31,9 +31,9 @@ func push (command *Command, args *Args) {
func pushToEveryRemote (args *Args) { func pushToEveryRemote (args *Args) {
remotes, idx := getRemotes(args) remotes, idx := getRemotes(args)
for _, i := range remotes { for _, a := range remotes {
copyArgs := args copyArgs := args
copyArgs.ReplaceParam(idx, i) copyArgs.ReplaceParam(idx, a)
if !args.Noop { if !args.Noop {
err := copyArgs.ToCmd().Exec() err := copyArgs.ToCmd().Exec()
utils.Check(err) utils.Check(err)
...@@ -46,10 +46,10 @@ func pushToEveryRemote (args *Args) { ...@@ -46,10 +46,10 @@ func pushToEveryRemote (args *Args) {
} }
func getRemotes(args *Args) (remotes []string, idx int) { func getRemotes(args *Args) (remotes []string, idx int) {
for a, i := range args.Params { for i, a := range args.Params {
if !strings.HasPrefix(i, "-") { if !strings.HasPrefix(a, "-") {
remotes = strings.Split(i, ",") remotes = strings.Split(a, ",")
idx = a idx = i
return return
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册