mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-22 01:27:48 +08:00
Upgrade vendor "git" (#175)
This commit is contained in:

committed by
Lunny Xiao

parent
7596e41027
commit
871c964ef7
4
vendor/code.gitea.io/git/hook.go
generated
vendored
4
vendor/code.gitea.io/git/hook.go
generated
vendored
@ -102,13 +102,13 @@ func ListHooks(repoPath string) (_ []*Hook, err error) {
|
||||
}
|
||||
|
||||
const (
|
||||
HOOK_PATH_UPDATE = "hooks/update"
|
||||
HookPathUpdate = "hooks/update"
|
||||
)
|
||||
|
||||
// SetUpdateHook writes given content to update hook of the reposiotry.
|
||||
func SetUpdateHook(repoPath, content string) (err error) {
|
||||
log("Setting update hook: %s", repoPath)
|
||||
hookPath := path.Join(repoPath, HOOK_PATH_UPDATE)
|
||||
hookPath := path.Join(repoPath, HookPathUpdate)
|
||||
if com.IsExist(hookPath) {
|
||||
err = os.Remove(hookPath)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user