Port issue from gitlabhq/gitlabhq#6662
As @jhollingsworth commented:
The archive is created and then stored in tmp/repositories, so this behavior should only occur if that directory is being cleared out between downloads. Recreating the archive causes a different timestamp to be associated with the internal tar file.
That being said, the behavior is quite easy to emulate and reproduce in a terminal window. Try running this:
cat somefile | gzip > out1.gz
cat somefile | gzip > out2.gz
The somefile should just be any file you want. If you run these right after each other, the checksums will be different. Now run:
cat somefile | gzip -n > out3.gz
cat somefile | gzip -n > out4.gz
The checksums for these 2 new files will be the same. The -n suppresses storing the original file name and/or timestamp.
You should be able to change this line from:
pipe_cmd = "gzip"
pipe_cmd = "gzip -n"
and have your fix.
@axilleas do you have a PR?
Do not save the original file name and timestamp by default. Fix #32
Thanks to the Archlinux community for catching this
and @jhollingsworth for coming up with a fix :)