From: Jakub Narebski Date: Thu, 30 Jul 2009 08:31:28 GMT Subject: Re: Add Gitweb support for LZMA compressed snapshots Message-ID: In-Reply-To: Mark A Rada writes: > I thought I would submit this little patch I made to my gitweb. I am > on a relatively slow connection, and so LZMA compression time is > less of a concern than bandwidth---I'm guessing that I am not the > only person who suffers from slow internet connection syndrome. First, Documentation/SubmittingPatches states that we prefer inline patches, with additional comments (like the one above) either between "---\n" line and diffstat, or like I did here before patch with patch separated by comment by e.g. "-- >8 --\n" (scissors) line. If posting patch inline isn't possible, and you have to use attachement (for example because mailer you use wraps lines), please at least use 'text/plain' mimetype so patch can be viewed without need to save it in separate file (this might require changing suffix from '.patch' to '.txt'). Second, if you are using 'txz' as internal name for new snapshot format, why not use 'XZ utils' instead of 'LZMA Utils', and use 'display' => 'txz', 'type' => 'application/x-xz' and 'suffix' => '.txz' (BTW. shouldn't suffix in your case be '.tar.lzma' and not only '.lzma'?) and of course 'compressor' => ['xz']? BTW. I wonder if it would be good idea to add support for this format directly to git-archive... OTOH it would mean additional dependency. -- Jakub Narebski Git User's Survey 2009: http://tinyurl.com/GitSurvey2009 -- >8 -- From: Mark Rada Subject: [PATCH] Add Gitweb support for LZMA compressed snapshots Signed-off-by: Mark Rada --- gitweb/gitweb.perl | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 38492d0..e131ea4 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -184,6 +184,13 @@ our %known_snapshot_formats = ( 'format' => 'tar', 'compressor' => ['bzip2']}, + 'txz' => { + 'display' => 'tar.lzma', + 'type' => 'application/x-lzma', + 'suffix' => '.lzma', + 'format' => 'tar', + 'compressor' => ['lzma']}, + 'zip' => { 'display' => 'zip', 'type' => 'application/x-zip', @@ -196,6 +203,7 @@ our %known_snapshot_formats = ( our %known_snapshot_format_aliases = ( 'gzip' => 'tgz', 'bzip2' => 'tbz2', + 'lzma' => 'txz', # backward compatibility: legacy gitweb config support 'x-gzip' => undef, 'gz' => undef, -- 1.6.4