summaryrefslogtreecommitdiff
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 <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 Aguilar
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 Zullinger
Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-16Minor usage update in setgitperms.perlJosh England
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-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 <jjengla@sandia.gov> Signed-off-by: Junio C Hamano <gitster@pobox.com>