From c26e479ae5d241a9d9c9d3275e005781474922ff Mon Sep 17 00:00:00 2001 From: Marco Burro Date: Fri, 9 Jan 2026 09:15:21 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Avoid=20archiving=20`.git`=20by?= =?UTF-8?q?=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fastapi_cloud_cli/commands/deploy.py | 1 + tests/test_archive.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/fastapi_cloud_cli/commands/deploy.py b/src/fastapi_cloud_cli/commands/deploy.py index 18146784..03e26fca 100644 --- a/src/fastapi_cloud_cli/commands/deploy.py +++ b/src/fastapi_cloud_cli/commands/deploy.py @@ -51,6 +51,7 @@ def _should_exclude_entry(path: Path) -> bool: "__pycache__", ".mypy_cache", ".pytest_cache", + ".git", ".gitignore", ".fastapicloudignore", ] diff --git a/tests/test_archive.py b/tests/test_archive.py index 1d3b232a..e74d8eb1 100644 --- a/tests/test_archive.py +++ b/tests/test_archive.py @@ -125,6 +125,7 @@ def test_archive_respects_fastapicloudignore_unignore( # Rignore needs a .git folder to make .gitignore work (src_path / ".git").mkdir(exist_ok=True, parents=True) + (src_path / ".git" / "config").write_text("[core]\n\trepositoryformatversion = 0") (src_path / ".gitignore").write_text("ignore_me.txt\nbuild/") (src_path / ".fastapicloudignore").write_text("!static/build")