Skip to content

Commit 1e754b5

Browse files
authored
πŸ› Avoid archiving .git by default (#143)
1 parent e79be2b commit 1e754b5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

β€Žsrc/fastapi_cloud_cli/commands/deploy.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def _should_exclude_entry(path: Path) -> bool:
5151
"__pycache__",
5252
".mypy_cache",
5353
".pytest_cache",
54+
".git",
5455
".gitignore",
5556
".fastapicloudignore",
5657
]

β€Žtests/test_archive.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def test_archive_respects_fastapicloudignore_unignore(
125125

126126
# Rignore needs a .git folder to make .gitignore work
127127
(src_path / ".git").mkdir(exist_ok=True, parents=True)
128+
(src_path / ".git" / "config").write_text("[core]\n\trepositoryformatversion = 0")
128129
(src_path / ".gitignore").write_text("ignore_me.txt\nbuild/")
129130

130131
(src_path / ".fastapicloudignore").write_text("!static/build")

0 commit comments

Comments
Β (0)