From: Rogan Dawes Date: Wed, 18 Apr 2007 06:24:29 GMT Subject: Re: [PATCH 2/2] Add keyword unexpansion support to convert.c Message-ID: <4625B99D.9090409@dawes.za.net> In-Reply-To: Nicolas Pitre wrote: > On Tue, 17 Apr 2007, David Lang wrote: > >> I've >> been told in the past that once .gitattributes is in place then the hooks for >> the crlf stuff can be generalized to allow for calls out to custom code to do >> this sort of thing. > > And I agree that this is a perfectly sensible thing to do. The facility > should be there for you to apply any kind of transformation with > external tools on data going in or out from Git. There are good and bad > things you can do with such a facility, but at least it becomes your > responsibility to screw^H^H^H^Hfilter your data and not something that > is enforced by Git itself. > > > Nicolas One of the examples that has been given in the past has been taking a zipped OpenDocumentFormat file, unzipping it to its component parts, and then committing the individual files rather than the aggregate. But I can't figure out how this might work. One idea is to store the binary ODF file in the index (and in the packs, etc) as a directory with the individual text (and other) files as entries within that directory. Then, when various git operations want to use the directory, the operation is redirected via an attribute match to an external script that knows how to checkout an ODF "directory", or diff an ODF "directory", etc. Or similarly, when checking an "ODF" file in, the attribute would lead to an appropriate script creating the "tree" of individual files. Does this sound workable? Rogan