Skip to content

Commit

Permalink
fix: remove the ignore .git folder default when no exclude files are …
Browse files Browse the repository at this point in the history
…present
  • Loading branch information
sgaist committed Dec 13, 2023
1 parent cc70092 commit 1bb3cba
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions repo2docker/buildpacks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import escapism
import jinja2

from docker.utils.build import exclude_paths

# Only use syntax features supported by Docker 17.09
Expand Down Expand Up @@ -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()
]
Expand All @@ -626,9 +625,6 @@ def _filter_tar(tarinfo):
]
)

if not exclude:
exclude = ["**/.git"]

files_to_add = exclude_paths(".", exclude)

if files_to_add:
Expand Down

0 comments on commit 1bb3cba

Please sign in to comment.