Re: metastore (was: Track /etc directory using Git)
- From
- david@lang.hm <david@lang.hm>
- Date
- Sep 16, 2007, 20:36 UTC
- Message-ID
- <Pine.LNX.4.64.0709161321360.24221@asgard.lang.hm>
- In-Reply-To
- <20070916155913.GB30476@efreet.light.src>
On Sun, 16 Sep 2007, Jan Hudec wrote:
Show 11 quoted lines
> On Sat, Sep 15, 2007 at 18:30:53 -0700, david@lang.hm wrote: >> 1. whatever is trying to write the files with the correct permissions >> needs to be able to query the permission store before files are >> written. This needs to either be an API call into git to retreive the >> information for any file when it's written, or the ability to define a >> specific file to be checked out first so that it can be used for >> everything else. > > You seem to be forgetting about the index. Git never writes trees directly to > filesystem, but always with intermediate step in the index. So the API > actually exists -- simply read from the index.
Ok, this sounds promising.
looking into one approach here.
assume for the moment that at write time an external program gets called.
this program reads the file contents from stdin and gets it's other
information from git as command line parameters
parameters I can think it would need are
path to write the file to
length of file
name of the permission file
id of the commit this is part of (possibly)how does this program access the contents of the permission file in the index?
David Lang