aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--cmd/web.go2
-rw-r--r--vendor/github.com/gogits/git-module/README.md2
-rw-r--r--vendor/github.com/gogits/git-module/git.go2
-rw-r--r--vendor/github.com/gogits/git-module/tree.go24
-rw-r--r--vendor/vendor.json6
6 files changed, 20 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 9b04e69e..a71776ff 100644
--- a/Makefile
+++ b/Makefile
@@ -70,11 +70,11 @@ test:
go test -cover -race ./...
fixme:
- grep -rnw "FIXME" routers models modules
+ grep -rnw "FIXME" cmd routers models modules
todo:
- grep -rnw "TODO" routers models modules
+ grep -rnw "TODO" cmd routers models modules
# Legacy code should be remove by the time of release
legacy:
- grep -rnw "LEGACY" routers models modules
+ grep -rnw "LEGACY" cmd routers models modules
diff --git a/cmd/web.go b/cmd/web.go
index 88ba397e..aa4d84b0 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -95,7 +95,7 @@ func checkVersion() {
{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"},
{"gopkg.in/ini.v1", ini.Version, "1.8.4"},
{"gopkg.in/macaron.v1", macaron.Version, "1.1.7"},
- {"github.com/gogits/git-module", git.Version, "0.4.8"},
+ {"github.com/gogits/git-module", git.Version, "0.4.9"},
{"github.com/gogits/go-gogs-client", gogs.Version, "0.12.1"},
}
for _, c := range checkers {
diff --git a/vendor/github.com/gogits/git-module/README.md b/vendor/github.com/gogits/git-module/README.md
index 2ced00d1..9dedf5a9 100644
--- a/vendor/github.com/gogits/git-module/README.md
+++ b/vendor/github.com/gogits/git-module/README.md
@@ -4,7 +4,7 @@ Package git-module is a Go module for Git access through shell commands.
## Limitations
-- Go version must be at least **1.3**.
+- Go version must be at least **1.4**.
- Git version must be no less than **1.7.1**, and greater than or equal to **1.8.0** is recommended.
- For Windows users, try use as new a version as possible.
diff --git a/vendor/github.com/gogits/git-module/git.go b/vendor/github.com/gogits/git-module/git.go
index f7a4d7fb..9c95d45e 100644
--- a/vendor/github.com/gogits/git-module/git.go
+++ b/vendor/github.com/gogits/git-module/git.go
@@ -10,7 +10,7 @@ import (
"time"
)
-const _VERSION = "0.4.8"
+const _VERSION = "0.4.9"
func Version() string {
return _VERSION
diff --git a/vendor/github.com/gogits/git-module/tree.go b/vendor/github.com/gogits/git-module/tree.go
index 50e65f68..789d4c9b 100644
--- a/vendor/github.com/gogits/git-module/tree.go
+++ b/vendor/github.com/gogits/git-module/tree.go
@@ -29,25 +29,23 @@ func NewTree(repo *Repository, id sha1) *Tree {
}
}
-var escapeChar = []byte("\\")
+// Predefine []byte variables to avoid runtime allocations.
+var (
+ escapedSlash = []byte(`\\`)
+ regularSlash = []byte(`\`)
+ escapedTab = []byte(`\t`)
+ regularTab = []byte("\t")
+)
// UnescapeChars reverses escaped characters.
func UnescapeChars(in []byte) []byte {
- if bytes.Index(in, escapeChar) == -1 {
+ // LEGACY [Go 1.7]: use more expressive bytes.ContainsAny
+ if bytes.IndexAny(in, "\\\t") == -1 {
return in
}
- endIdx := len(in) - 1
- isEscape := false
- out := make([]byte, 0, endIdx+1)
- for i := range in {
- if in[i] == '\\' && !isEscape {
- isEscape = true
- continue
- }
- isEscape = false
- out = append(out, in[i])
- }
+ out := bytes.Replace(in, escapedSlash, regularSlash, -1)
+ out = bytes.Replace(out, escapedTab, regularTab, -1)
return out
}
diff --git a/vendor/vendor.json b/vendor/vendor.json
index fc3a2cae..950f806e 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -159,10 +159,10 @@
"revisionTime": "2016-08-10T03:50:02Z"
},
{
- "checksumSHA1": "PvpYCMEys67XcZPCZR27tRjnkHY=",
+ "checksumSHA1": "RSr3IvGo5PFxAP3ybtDcEojTWPI=",
"path": "github.com/gogits/git-module",
- "revision": "a6d3c3660265eece3a34aef4f6ec4ce29b543294",
- "revisionTime": "2017-02-15T23:32:44Z"
+ "revision": "41f3ca26f6b202c82d022a1062f7b7ea6339924b",
+ "revisionTime": "2017-02-16T16:46:07Z"
},
{
"checksumSHA1": "xvG+RgJODQqlmdAkHUQK2TyLR88=",