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>
This commit is contained in:
Ricardo Martincoski 2017-04-20 03:36:47 -03:00 committed by Thomas Petazzoni
parent b51ed6312d
commit 5d6ec40b75

View file

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