Преглед на файлове

download/git: clarify why .git is removed

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>
Ricardo Martincoski преди 8 години
родител
ревизия
5d6ec40b75
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      support/download/git

+ 4 - 1
support/download/git

@@ -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