Skip to content

Commit 1bb3cba

Browse files
committed
fix: remove the ignore .git folder default when no exclude files are present
1 parent cc70092 commit 1bb3cba

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

repo2docker/buildpacks/base.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import escapism
1313
import jinja2
14-
1514
from docker.utils.build import exclude_paths
1615

1716
# Only use syntax features supported by Docker 17.09
@@ -614,7 +613,7 @@ def _filter_tar(tarinfo):
614613

615614
for ignore_file_name in [".dockerignore", ".containerignore"]:
616615
if os.path.exists(ignore_file_name):
617-
with open(ignore_file_name, "r") as ignore_file:
616+
with open(ignore_file_name) as ignore_file:
618617
cleaned_lines = [
619618
line.strip() for line in ignore_file.read().splitlines()
620619
]
@@ -626,9 +625,6 @@ def _filter_tar(tarinfo):
626625
]
627626
)
628627

629-
if not exclude:
630-
exclude = ["**/.git"]
631-
632628
files_to_add = exclude_paths(".", exclude)
633629

634630
if files_to_add:

0 commit comments

Comments
 (0)