]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: supply '-n' to gzip for identical output
authorFraser Tweedale <redacted>
Tue, 26 Apr 2011 01:32:00 +0000 (11:32 +1000)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:30 +0000 (00:51 -0400)
For projects that do not release official archives, gitweb's snapshot
feature would be an excellent alternative, and but without the '-n'
('--no-name') argument, gzip includes a timestamp in output which results
in different files.  Because some systems hash/checksum downloaded files
to ensure integrity of the tarball (e.g FreeBSD), it is desirable to
produce tarballs in a reproducible way for that purpose.

Whilst '--no-name' is more descriptive, the long version of the flag is
not supported on all systems.  In particular, OpenBSD does not appear to
support it.

Supply '-n' to gzip to exclude timestamp from output and produce idential
output every time.

Signed-off-by: Fraser Tweedale <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 1c2bd12ca57e9320d27e463c5c69c7e2d7157e4f68368adaa6ea3f42a8ba4bf5..490a04da249f94b1b14d12a2a01970f965f0aae6e8b9f212d354a2f87a6d4cc0 100755 (executable)
@@ -187,7 +187,7 @@ our %known_snapshot_formats = (
                'type' => 'application/x-gzip',
                'suffix' => '.tar.gz',
                'format' => 'tar',
-               'compressor' => ['gzip']},
+               'compressor' => ['gzip', '-n']},
 
        'tbz2' => {
                'display' => 'tar.bz2',
This page took 0.303563 seconds and 4 git commands to generate.