Subject: Re: [PATCH - stgit] Patch to allow import of compressed files

From: Clark Williams <[email-masked]>
Date: Tue, 10 Jun 2008 09:01:43 -0500

Sverre Rabbelier wrote:
> On Tue, Jun 10, 2008 at 8:38 AM, Asheesh Laroia <[email-masked]> wrote:
>> Peanut gallery question: Why not just always try these methods and catch
>> some format exception if they fail, proceeding to the next possible
>> decompressor (proceeding on to no decompressor)?
>>
>> That way if a file is called .GZ, it will still be handled properly; in
>> fact, all files would still be handled properly.  And these formats leave
>> notes in the first few bytes of the file as to if they should be tried, so
>> it's not as if it would come at some performance cost.
> 
> How about adding in '.tar' decompression as well, -after- the '.gz'
> decompression? That way you can have .tar.gz's and still be fine.
> 

I thought about this, as well as the .zip format. The problem is in multiple files
and how to handle them. Do you look for a series and automagically add '--series'
semantics? What about ignore/replace?  If no series file, do you just try to apply
all of them? In what order? Look for '.patch' suffix and only use those? And what
about the old '.tgz' suffix? Lots of different ways to go here.

I don't think it would be a bad thing to add .tar and .zip handling, but I'd rather
bat it around a little on this list before doing it. That way we can find out how
people would like to use it.

Clark