fix: remove the ignore .git folder default when no exclude files are present

pull/1205/head
Samuel Gaist 2023-12-13 17:56:03 +01:00
rodzic d6670f4378
commit a51235f9a5
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -11,7 +11,6 @@ from functools import lru_cache
import escapism
import jinja2
from docker.utils.build import exclude_paths
# Only use syntax features supported by Docker 17.09
@ -614,7 +613,7 @@ class BuildPack:
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 @@ class BuildPack:
]
)
if not exclude:
exclude = ["**/.git"]
files_to_add = exclude_paths(".", exclude)
if files_to_add: