From a51235f9a5e87763b1305d739de8a57b26b9df94 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Wed, 13 Dec 2023 17:56:03 +0100 Subject: [PATCH] fix: remove the ignore .git folder default when no exclude files are present --- repo2docker/buildpacks/base.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/repo2docker/buildpacks/base.py b/repo2docker/buildpacks/base.py index aa469ee0e..06f52224b 100644 --- a/repo2docker/buildpacks/base.py +++ b/repo2docker/buildpacks/base.py @@ -11,7 +11,6 @@ import escapism import jinja2 - from docker.utils.build import exclude_paths # Only use syntax features supported by Docker 17.09 @@ -614,7 +613,7 @@ def _filter_tar(tarinfo): for ignore_file_name in [".dockerignore", ".containerignore"]: if os.path.exists(ignore_file_name): - with open(ignore_file_name, "r") as ignore_file: + with open(ignore_file_name) as ignore_file: cleaned_lines = [ line.strip() for line in ignore_file.read().splitlines() ] @@ -626,9 +625,6 @@ def _filter_tar(tarinfo): ] ) - if not exclude: - exclude = ["**/.git"] - files_to_add = exclude_paths(".", exclude) if files_to_add: