未验证 提交 55dec7d3 编写于 作者: M Mislav Marohnić 提交者: GitHub

Merge pull request #1619 from jsoref/spelling

Spelling
......@@ -47,13 +47,13 @@ func clone(command *Command, args *Args) {
func transformCloneArgs(args *Args) {
isSSH := parseClonePrivateFlag(args)
hasValueRegxp := regexp.MustCompile("^(--(upload-pack|template|depth|origin|branch|reference|name)|-[ubo])$")
hasValueRegexp := regexp.MustCompile("^(--(upload-pack|template|depth|origin|branch|reference|name)|-[ubo])$")
nameWithOwnerRegexp := regexp.MustCompile(NameWithOwnerRe)
for i := 0; i < args.ParamsSize(); i++ {
a := args.Params[i]
if strings.HasPrefix(a, "-") {
if hasValueRegxp.MatchString(a) {
if hasValueRegexp.MatchString(a) {
i++
}
} else {
......
......@@ -34,12 +34,12 @@ func init() {
func fetch(command *Command, args *Args) {
if !args.IsParamsEmpty() {
err := tranformFetchArgs(args)
err := transformFetchArgs(args)
utils.Check(err)
}
}
func tranformFetchArgs(args *Args) error {
func transformFetchArgs(args *Args) error {
names := parseRemoteNames(args)
localRepo, err := github.LocalRepo()
......
......@@ -50,13 +50,13 @@ func transformInitArgs(args *Args) error {
var err error
dirToInit := "."
hasValueRegxp := regexp.MustCompile("^--(template|separate-git-dir|shared)$")
hasValueRegexp := regexp.MustCompile("^--(template|separate-git-dir|shared)$")
// Find the first argument that isn't related to any of the init flags.
// We assume this is the optional `directory` argument to git init.
for i := 0; i < args.ParamsSize(); i++ {
arg := args.Params[i]
if hasValueRegxp.MatchString(arg) {
if hasValueRegexp.MatchString(arg) {
i++
} else if !strings.HasPrefix(arg, "-") {
dirToInit = arg
......
......@@ -116,7 +116,7 @@ hub(1), git-tag(1)
Run: downloadRelease,
}
cmdDeleteRelase = &Command{
cmdDeleteRelease = &Command{
Key: "delete",
Run: deleteRelease,
}
......@@ -165,7 +165,7 @@ func init() {
cmdRelease.Use(cmdCreateRelease)
cmdRelease.Use(cmdEditRelease)
cmdRelease.Use(cmdDownloadRelease)
cmdRelease.Use(cmdDeleteRelase)
cmdRelease.Use(cmdDeleteRelease)
CmdRunner.Use(cmdRelease)
}
......
......@@ -5,8 +5,8 @@ import (
)
func IsHttpsProtocol() bool {
httpProcotol, _ := git.Config("hub.protocol")
if httpProcotol == "https" {
httpProtocol, _ := git.Config("hub.protocol")
if httpProtocol == "https" {
return true
}
......
......@@ -20,7 +20,7 @@ type expander struct {
// values is the map of values that should be expanded.
values map[string]string
// colorize is a flag to indiciate whether to use colors.
// colorize is a flag to indicate whether to use colors.
colorize bool
// skipNext is true if the next placeholder is not a placeholder and can be
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册