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

Changed variable names

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