Added example hook script to save/restore permissions/ownership.
commitaf6fb4c822a5a65c7671d810127171759dff38f6
authorJosh England <jjengla@sandia.gov>
Tue, 11 Sep 2007 16:59:04 +0000 (11 10:59 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Sep 2007 00:40:24 +0000 (18 17:40 -0700)
tree8e72a9501f770d21dd28dd6363c96ff50d570811
parent46232915d5ac84fb033ad395bbf161c9645c42c9
Added example hook script to save/restore permissions/ownership.

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>
Documentation/hooks.txt
contrib/hooks/setgitperms.perl [new file with mode: 0644]