author | Josh England <jjengla@sandia.gov> | |
Tue, 11 Sep 2007 16:59:04 +0000 (10:59 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Sep 2007 00:40:24 +0000 (17:40 -0700) | ||
commit | af6fb4c822a5a65c7671d810127171759dff38f6 | |
tree | 8e72a9501f770d21dd28dd6363c96ff50d570811 | tree | snapshot |
parent | 46232915d5ac84fb033ad395bbf161c9645c42c9 | commit | diff |
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>
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 | diff | blob | history | |
contrib/hooks/setgitperms.perl | [new file with mode: 0644] | blob |