-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
- Gitea version (or commit ref): 1.7.4
- Git version: 2.17.1
- Operating system: linux
- Database (use
[x]
):- Not relevant
- Can you reproduce the bug at https://try.gitea.io:
- Not relevant
- Log gist:
Description
If repositories directory is copied from Windows to Linux machine - hooks will lose executable permissions. It's also easy to forget this aspect when restoring from backup using Windows machine.
Function "Resynchronize pre-receive, update and post-receive hooks" are very handy when dealing with migration from one server to another, but the only problem is - it doesn't set executable bit explicitely if hook files already exist, it set it only for new files via WriteFile third parameter.
Would be nice if this function will also fix hook files permissions, not only overwrite hooks content with new path to gitea executable.
Or separate function "Fix executable permission on all hooks" which should recursively set +x on all files inside each repo hooks directory (hide this function from admin panel if os == 'windows')