On 04/28/10 21:13, Sergio Callegari wrote:
If you store a structured file as a multiblob, you can use a blob for each uncompressed element of content. For instance, when storing an opendocument file you could use a blob for manifest.xml, one for content.xml, etc... (try unzip -l on an odt or odp file to get an idea). When you edit your file only a few of these change. For instance, if we talk about a presentation, each slide has its own content.xml, so changing one slide only that changes.
I'll obviously let the Git experts answer you, but I can answer about OpenDocument itself.
In a presentation each slide is a <draw:page/> inside a single content.xml. So if you change one slide, the whole XML will serialize with a different SHA.
And maybe you'll add style to that slide, or probably OpenOffice.org will generate an automatic style, so styles.xml will also change. Adding an image also changes manifest.xml, along with storing the image itself. OOo will surely record the last slide displayed when closing the application, so settings.xml will change too.
So, all in all, for a single slide, 30 to 80 % of the Zip content may change.
Unless you are talking about a dedicated application to store and generate on-the-fly office documents, built on top of Git, you're better not touching the contents the user is entrusting git to store, and write a .gitattribute not to compress them in a pack.
You may also be interested in the git-bigfiles project that was mentioned last week.
http://caca.zoy.org/wiki/git-bigfiles -- Hervé Cauwelier - ITAAPY - 9 rue Darwin 75018 Paris Tél. 01 42 23 67 45 - Fax 01 53 28 27 88 http://www.itaapy.com/ - http://www.cms-migration.com -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html