Thread (32 messages) flat view 32 messages, 11 authors, 2016-06-15

Re: [PATCH 2/2] Add keyword unexpansion support to convert.c

From: Rogan Dawes <hidden>
Date: 2016-06-15 22:43:05

Possibly related (same subject, not in this thread)

Nicolas Pitre wrote:
On Tue, 17 Apr 2007, David Lang wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help