diff options
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/gogits/git-module/git.go | 2 | ||||
-rw-r--r-- | vendor/github.com/gogits/git-module/hook.go | 14 | ||||
-rw-r--r-- | vendor/vendor.json | 6 |
3 files changed, 14 insertions, 8 deletions
diff --git a/vendor/github.com/gogits/git-module/git.go b/vendor/github.com/gogits/git-module/git.go index eee4b1b5..fc834196 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.11" +const _VERSION = "0.4.12" func Version() string { return _VERSION diff --git a/vendor/github.com/gogits/git-module/hook.go b/vendor/github.com/gogits/git-module/hook.go index 6ba66be0..a0d0b16b 100644 --- a/vendor/github.com/gogits/git-module/hook.go +++ b/vendor/github.com/gogits/git-module/hook.go @@ -13,8 +13,9 @@ import ( ) var ( - // Direcotry of hook file. Can be changed to "custom_hooks" for very purpose. - HookDir = "hooks" + // Direcotry of hook and sample files. Can be changed to "custom_hooks" for very purpose. + HookDir = "hooks" + HookSampleDir = HookDir // HookNames is a list of Git server hooks' name that are supported. HookNames = []string{ "pre-receive", @@ -62,8 +63,13 @@ func GetHook(repoPath, name string) (*Hook, error) { } h.IsActive = true h.Content = string(data) - } else if isFile(h.path + ".sample") { - data, err := ioutil.ReadFile(h.path + ".sample") + return h, nil + } + + // Check sample file + samplePath := path.Join(repoPath, HookSampleDir, h.name) + ".sample" + if isFile(samplePath) { + data, err := ioutil.ReadFile(samplePath) if err != nil { return nil, err } diff --git a/vendor/vendor.json b/vendor/vendor.json index 81ec3600..f2805a11 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -159,10 +159,10 @@ "revisionTime": "2016-08-10T03:50:02Z" }, { - "checksumSHA1": "JPQWxQRYFpezMThuSqcPhvbJdq4=", + "checksumSHA1": "RnWB5UDcTpSGepvWnwic1SyRZrc=", "path": "github.com/gogits/git-module", - "revision": "c882f3d24df5fb730d3b3c1b6cc64416dd22660c", - "revisionTime": "2017-02-18T23:44:51Z" + "revision": "1b9552bab7499e5cbd96f6b550aaa0038faf6b67", + "revisionTime": "2017-02-19T18:16:29Z" }, { "checksumSHA1": "xvG+RgJODQqlmdAkHUQK2TyLR88=", |