download/git: clarify why .git is removed
authorRicardo Martincoski <ricardo.martincoski@gmail.com>
Thu, 20 Apr 2017 06:36:47 +0000 (03:36 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 20 Apr 2017 20:27:23 +0000 (22:27 +0200)
The removal of the .git dir before creating the tarball is not anymore
just an optimization. It is necessary to make the tarball reproducible.
Also, without the removal, large tarballs (gigabytes) would be created
for some linux trees.

Update the comment accordingly.

Reported-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/download/git

index 056057c70080415609255a4f6b3bdd68658864e5..fc2957d2ca41ffa6a925a6d91348395c969cd9a2 100755 (executable)
@@ -85,8 +85,11 @@ if [ ${recurse} -eq 1 ]; then
     _git submodule update --init --recursive
 fi
 
-# We do not need the .git dir; we keep other .git files, in case they
+# We do not want the .git dir; we keep other .git files, in case they
 # are the only files in their directory.
+# The .git dir would generate non reproducible tarballs as it depends on
+# the state of the remote server. It also would generate large tarballs
+# (gigabytes for some linux trees) when a full clone took place.
 rm -rf .git
 
 popd >/dev/null