Skip to content

Commit 0c8c385

Browse files
frasertweedalegitster
authored andcommitted
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 <[email protected]> Acked-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ec014ea commit 0c8c385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitweb/gitweb.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ sub evaluate_uri {
186186
'type' => 'application/x-gzip',
187187
'suffix' => '.tar.gz',
188188
'format' => 'tar',
189-
'compressor' => ['gzip']},
189+
'compressor' => ['gzip', '-n']},
190190

191191
'tbz2' => {
192192
'display' => 'tar.bz2',

0 commit comments

Comments
 (0)