Thread (31 messages) flat view 31 messages, 15 authors, 2016-08-11

Re: Using GIT to store /etc (Or: How to make GIT store all file permission bits)

From: David Lang <hidden>
Date: 2016-06-15 22:42:48

On Tue, 9 Jan 2007, Shawn O. Pearce wrote:
David Lang [off-list ref] wrote:
quoted
I want to have a tripwire-like system checking the files to make sure that
they haven't changed unexpectedly. the program I'm looking at notices inode
as well as timestamp and content changed.

when you checkout a file from git will it re-write/overwrite a file that
hasn't changed or will it realize there is no change and leave it as-is?
If the stat data is current it will leave it as-is.  You can force
the index to refresh with `git update-index --refresh` or by running
git status.
I was looking at checkout, not checkin so I'm not understanding how the index is 
involved here.
quoted
does this answer change if there is a trigger on checkout (to change
permissions or otherwise manipulate the file)?
Only if the trigger does something in addition, like force overwrite
files.  But we don't have a checkout trigger.  So there's no trigger.
we don't have a checkout trigger? I thought that what Linus had suggested for 
permissions was to have a script triggered on checkin that stored the 
permissions of the files, and a script triggered on checkout that set the 
permissions from the stored file.

if there isn't a checkout trigger how would the permissions ever get set?

in my particular case I'd like to have the checkin run a script that produces a 
'generic' version of each file, and the checkout run a script that converts the 
generic version into the host specific version. I already have a script that 
does this work (and (ab)uses ssh to propogate the generic version to other hosts 
and create the host specific versions there), but I was interested in useing git 
to add better version control to the generic versions of the files (I currently 
use RCS on each box to version control the host specific versions)

David Lang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help