git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Add Gitweb support for LZMA compressed snapshots

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 30, 2009, 08:31 UTC
Message-ID
<m3r5vy1siq.fsf@localhost.localdomain>
In-Reply-To
<E0C39B59-E2C5-4C28-9570-D33FEA2A44EB@uwaterloo.ca>
Mark A Rada <marada@uwaterloo.ca> 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 <marada@uwaterloo.ca>
Subject: [PATCH] Add Gitweb support for LZMA compressed snapshots

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
---
 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
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 9 of 17 in “Add Gitweb support for LZMA compressed snapshots”
  1. Mark A RadaJul 30, 2009
  2. J.H.Jul 30, 2009
  3. Alex RiesenAug 1, 2009
  4. Dmitry PotapovAug 1, 2009
  5. André Goddard RosaAug 1, 2009
  6. Jim MeyeringAug 1, 2009
  7. Alex RiesenAug 1, 2009
  8. Johannes SchindelinJul 30, 2009
  9. Jakub NarebskiJul 30, 2009
  10. Johannes SchindelinJul 30, 2009
  11. Felipe ContrerasJul 31, 2009
  12. Johannes SchindelinAug 1, 2009
  13. Felipe ContrerasAug 1, 2009
  14. Erik Faye-LundAug 1, 2009
  15. Mark A RadaAug 1, 2009
  16. Erik Faye-LundAug 1, 2009
  17. Dmitry PotapovAug 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.