@matheusbsbs / matheus-bagliano / commits / 0c8c385ef1
Fork 0

gitweb: supply '-n' to gzip for identical output

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 <frase@frase.id.au> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fraser Tweedale committed Apr 26, 2011 at 11:32 UTC 0c8c385ef188bf76b6edcda87a7cc9bc05596fa3
1 file changed +1 -1
gitweb/gitweb.perl
+1 -1
@@ -186,7 +186,7 @@ our %known_snapshot_formats = (
186 'type' => 'application/x-gzip',
187 'suffix' => '.tar.gz',
188 'format' => 'tar',
189 - 'compressor' => ['gzip']},
189 + 'compressor' => ['gzip', '-n']},
190
191 'tbz2' => {
192 'display' => 'tar.bz2',