summaryrefslogtreecommitdiffstats
path: root/models/action.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-03 04:44:20 -0400
committerUnknwon <u@gogs.io>2015-09-03 04:44:20 -0400
commita7ee654646e0f40834066ee0ec173aa54c235b08 (patch)
tree3b702de084c0d0c293aae02b57cc755b7b90e06c /models/action.go
parentb6131793dacc3e49411d6bf1ade6220221739dc1 (diff)
downloadgitea-a7ee654646e0f40834066ee0ec173aa54c235b08.tar.gz
gitea-a7ee654646e0f40834066ee0ec173aa54c235b08.zip
#1544 better tmp dir name for creating repo
Diffstat (limited to 'models/action.go')
-rw-r--r--models/action.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/action.go b/models/action.go
index 1abc7363d2..07f5b17a79 100644
--- a/models/action.go
+++ b/models/action.go
@@ -226,6 +226,7 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
}
refMarked = make(map[int64]bool)
+ // FIXME: can merge this one and next one to a common function.
for _, ref := range IssueCloseKeywordsPat.FindAllString(c.Message, -1) {
ref = ref[strings.IndexByte(ref, byte(' '))+1:]
ref = strings.TrimRightFunc(ref, issueIndexTrimRight)
@@ -237,7 +238,7 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
// Add repo name if missing
if ref[0] == '#' {
ref = fmt.Sprintf("%s/%s%s", repoUserName, repoName, ref)
- } else if strings.Contains(ref, "/") == false {
+ } else if !strings.Contains(ref, "/") {
// We don't support User#ID syntax yet
// return ErrNotImplemented
continue
@@ -274,7 +275,7 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
// Add repo name if missing
if ref[0] == '#' {
ref = fmt.Sprintf("%s/%s%s", repoUserName, repoName, ref)
- } else if strings.Contains(ref, "/") == false {
+ } else if !strings.Contains(ref, "/") {
// We don't support User#ID syntax yet
// return ErrNotImplemented
continue