git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Tim Chase <git@tim.thechases.com>
Cc: git@vger.kernel.org
Subject: Re: clean/smudge filters on .zip/.tgz files
Date: Wed, 27 Feb 2013 07:39:10 +0100	[thread overview]
Message-ID: <512DAA0E.9010401@viscovery.net> (raw)
In-Reply-To: <20130226163800.454cd093@bigbox.christie.dr>

Am 2/26/2013 23:38, schrieb Tim Chase:
> Various programs that I use ([Open|Libre]Office, Vym, etc) use a
> zipped/.tgz'ed file format, usually containing multiple
> (usually) plain-text files within.
> 
> I'm trying to figure out a way for git to treat these as virtual
> directories for purposes of merging/diffing.  
> 
> Reading up on clean/smudge filters, it looks like they expect one
> file coming in and one file going out, rather than one file
> on one side and a directory-tree of files on the other side.
> 
> I tried creating my own pair of clean/smudge filters that would
> uncompress the files, but there's no good way put multiple files on
> stdout.
> 
> Has anybody else played with such a scheme for uncompressing files as
> they go into git and recompressing them as they come back out?

I attempted to do something like this for OpenDocument files (I didn't get
very far) until I discovered that LibreOffice can save "flat open document
files". That combined with the option "save files optimized" switched off
results in fairly readable XML in a single file that can even be merged
under some circumstances.

You would still need a clean filter that normalizes the style numbers,
cross reference marks and other stuff that changes each time LibreOffice
saves the file.

-- Hannes

  reply	other threads:[~2013-02-27  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 22:38 clean/smudge filters on .zip/.tgz files Tim Chase
2013-02-27  6:39 ` Johannes Sixt [this message]
2013-02-27 15:18   ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=512DAA0E.9010401@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@tim.thechases.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).