瀏覽代碼

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