path: root/contrib/hooks/setgitperms.perl
AgeCommit message (Collapse)Author
2013-11-25mark contributed hooks executableJonathan Nieder
The docs in contrib/hooks/pre-auto-gc-battery suggest: For example, if the hook is stored in /usr/share/git-core/contrib/hooks/pre-auto-gc-battery: chmod a+x pre-auto-gc-battery cd /path/to/your/repository.git ln -sf /usr/share/git-core/contrib/hooks/pre-auto-gc-battery \ hooks/pre-auto-gc Unfortunately on multi-user systems most users do not have write access to /usr. Better to mark the sample hooks executable in the first place so users do not have to tweak their permissions to use them by symlinking into .git/hooks/. Reported-by: Olivier Berger <> Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
2013-02-24contrib/hooks/setgitperms.perl: use a lowercase "usage:" stringDavid Aguilar
Make the usage string consistent with Git. Reviewed-by: Jonathan Nieder <> Signed-off-by: David Aguilar <> Signed-off-by: Junio C Hamano <>
2008-09-22Use dashless git commands in setgitperms.perlTodd Zullinger
Signed-off-by: Todd Zullinger <> Signed-off-by: Junio C Hamano <>
2007-10-16Minor usage update in setgitperms.perlJosh England
Signed-off-by: Josh England <> Signed-off-by: Lars Hjemli <> Signed-off-by: Shawn O. Pearce <>
2007-09-19Added example hook script to save/restore permissions/ownership.Josh England
Usage info is emebed in the script, but the gist of it is to run the script from a pre-commit hook to save permissions/ownership data to a file and check that file into the repository. Then, a post_merge hook reads the file and updates working tree permissions/ownership. All updates are transparent to the user (although there is a --verbose option). Merge conflicts are handled in the "read" phase (in pre-commit), and the script aborts the commit and tells you how to fix things in the case of a merge conflict in the metadata file. This same idea could be extended to handle file ACLs or other file metadata if desired. Signed-off-by: Josh England <> Signed-off-by: Junio C Hamano <>