On Tuesday 2006 December 12 13:49, Kyle Moffett wrote:
I wonder if git's skill at managing content is the answer? Rather than mess
around with git's internals, the index, or the object database; how about
simply having a pre-commit script that writes out a file that looks like:
-rw-r--r-- andyp andyp CHANGES
-rw-r--r-- andyp andyp COPYING
-rw-rw-r-- andyp andyp CREDITS
-rw-r--r-- andyp andyp Configure
-rw-rw-r-- andyp andyp Makefile
-rw-r--r-- andyp andyp README
If /that/ file were stored in the repository and you had a script that could
read that file and apply the permissions after a checkout you'd have what you
want.
If the permissions of a file changed but the content didn't, then
this ".gitpermissions" file would have changed content but the file itself
would remain the same. If the content changed but not the permissions
then ".gitpermissions" would be untouched.
Assuming that you're allowed to mess with the index in pre-commit (I haven't
checked), one half of it can be automatic. I suppose you could also plead
for a post-checkout hook to apply those permissions and the whole lot would
be transparent.
Andy
--
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html