User: Password:
|
|
Subscribe / Log in / New account

Using git and make for tasks beyond coding

Using git and make for tasks beyond coding

Posted Mar 14, 2014 23:35 UTC (Fri) by callegar (guest, #16148)
Parent article: Using git and make for tasks beyond coding

I often use git to store documents in addition to code. Often these are LaTeX files, but occasionally there can be opendocument files (libreoffice/openoffice) files too. Clearly there can be no automatic merge with them, but keeping history and branches is often good enough.

A notable issue, when storing opendocument files, is that git is unable to get good deltas of them, since they are actually compressed zip files. To solve this issue in https://github.com/callegar/Rezip I have a script that re-saves the opendocument files with no compression using git's clean/smudge functionality.

It works reasonably well in spite of being a bit hackish. In fact, it also works, with docx files, jar files, and more.

I believe it could be even better if git could provide hooks to expand archive type files in their component + a tree like object.


(Log in to post comments)

Using git and make for tasks beyond coding

Posted Mar 16, 2014 11:53 UTC (Sun) by spaetz (subscriber, #32870) [Link]

why don't you simply use the flat odt format which is an uncomoressed xml file?

Using git and make for tasks beyond coding

Posted Mar 19, 2014 15:40 UTC (Wed) by callegar (guest, #16148) [Link]

Basically to avoid confusing people I need to work with, who might not know what fodt, fodg are. Secondly because the trick is not LibO specific, but also works with docx and many other things.

As mentioned, it would be nice if git could be made 'container-file' aware.

Using git and make for tasks beyond coding

Posted Mar 20, 2014 5:01 UTC (Thu) by mathstuf (subscriber, #69389) [Link]

> As mentioned, it would be nice if git could be made 'container-file' aware.

Some kind of hybrid smudge-directory support (versus smudge-file)?


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds