All of lore.kernel.org
 help / color / mirror / Atom feed
* Followup: management of OO files - warning about "rezip" approach
@ 2008-12-14 13:08 Sergio Callegari
  2008-12-15 14:41 ` Peter Krefting
  0 siblings, 1 reply; 2+ messages in thread
From: Sergio Callegari @ 2008-12-14 13:08 UTC (permalink / raw)
  To: git

Hi, some times ago, i considered ways to achieve a smarter management of
openoffice files with git.

The thread started at:

http://article.gmane.org/gmane.comp.version-control.git/95951

There, a "rezip" script was proposed to store OO files uncompressed into git
repos, so that the compression and delta machinery of git could operate at its
best with them.

Appartently, the script rose some interest.  In the following days I received
quite a few corrections/enhancements proposals for which all the posters I thank.

Also I was asked to upload the script and instructions relative to its adoption
together with .gitattributes to the git wiki.

This I didn't do (I do not know if someone else might have done it) because I
first wanted to be absolutely sure that the script would cause no problems to
anybody.

Unfortunately, I now see that there is an issue, so I am sending a warning.

The problem stems from the fact that ODF files, due to the zip compression also
might store pieces of info that are completely irrelevant.  For instance zip
stores ownership of member files.  This is why in the rezip script I initially
started to unzip files with -X.

Now, this seems to be looking for trouble when repos are passed from one user to
another one.

When we uncompress and ODF file for storing we should probably scrap away the
member ownership info alltogether. Note that this is not equivalent to not using
-X.  Not using -X would mean "changing" member owernership when an ODF file is
passed from one user to another one.  Using -X seemed to me the correct thing to
do as it allowed to leave untouched the member ownership.  However, -X fails
when user A has no permission to create files as user B.

I found out about this issue by having accounts on many hosts, where my
alphanumeric user ID maps to different numeric IDs.

I will look better at this as soon as I have time.  So far, please just be
careful.  My guess is that we should not use -X on "unzip" but use it on "zip".

E.g. patch the rezip script so that

PROFILE_UNZIP_ODF_UNCOMPRESS='-b -qq'
PROFILE_ZIP_ODF_UNCOMPRESS='-q -r -D -0 -X'
PROFILE_UNZIP_ODF_COMPRESS='-b -qq'
PROFILE_ZIP_ODF_COMPRESS='-q -r -D -6 -X'


Sergio

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Followup: management of OO files - warning about "rezip" approach
  2008-12-14 13:08 Followup: management of OO files - warning about "rezip" approach Sergio Callegari
@ 2008-12-15 14:41 ` Peter Krefting
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Krefting @ 2008-12-15 14:41 UTC (permalink / raw)
  To: Sergio Callegari; +Cc: Git Mailing List

Sergio Callegari:

> E.g. patch the rezip script so that
> 
> PROFILE_UNZIP_ODF_UNCOMPRESS='-b -qq'
> PROFILE_ZIP_ODF_UNCOMPRESS='-q -r -D -0 -X'
> PROFILE_UNZIP_ODF_COMPRESS='-b -qq'
> PROFILE_ZIP_ODF_COMPRESS='-q -r -D -6 -X'

Yeah, that is exactly what I ended up doing.

I've been running the rezip script for quite a long time now,
versioning a spreadsheet that I update by adding stuff to up to several
times a week. Using this approach has shrunk the compressed .git
directory by about 90 % (before I started using rezip, it was about 9
megabytes, with rezip and 30 % more commits, it is now 1 megabyte).

-- 
\\// Peter - http://www.softwolves.pp.se/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-15 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-14 13:08 Followup: management of OO files - warning about "rezip" approach Sergio Callegari
2008-12-15 14:41 ` Peter Krefting

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.