aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/hooks/setgitperms.perl (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-05-12contrib: remove "hooks" directoryPatrick Steinhardt1-214/+0
The "hooks" directory contains a handful of example hooks. Most of these hooks are highly specific and haven't really received any updates over the last couple of years, except for some global cleanups. The multimail hook has also been removed in f74d11471fa (multimail: stop shipping a copy, 2021-06-10) in favor of its upstream project [1]. Remove those hooks. If we want to provide examples for how to use Git hooks we should do that as part of our documentation, for example in githooks(5). [1]: https://github.com/git-multimail/git-multimail Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-25mark contributed hooks executableJonathan Nieder1-0/+0
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 <olivier.berger@it-sudparis.eu> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24contrib/hooks/setgitperms.perl: use a lowercase "usage:" stringDavid Aguilar1-1/+1
Make the usage string consistent with Git. Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-22Use dashless git commands in setgitperms.perlTodd Zullinger1-2/+2
Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-15Minor usage update in setgitperms.perlJosh England1-3/+4
Signed-off-by: Josh England <jjengla@sandia.gov> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-18Added example hook script to save/restore permissions/ownership.Josh England1-0/+213
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 <jjengla@sandia.gov> Signed-off-by: Junio C Hamano <gitster@pobox.com>