Compare commits

..
1 Commits
4 changed files with 10 additions and 5 deletions

No files matched your search

+7 -2
View File
@@ -105,11 +105,16 @@ class GitOperator:
# ------------------------------------------------------------------ actions
def stage(self, files: list[str]) -> None:
"""``git add`` the given paths."""
"""Stage the given paths — ``git add`` for existing files, ``git rm`` for deleted."""
if not files:
return
existing = [f for f in files if Path(self.cwd or ".").joinpath(f).exists()]
deleted = [f for f in files if f not in existing]
try:
self._run(["git", "add", *files])
if existing:
self._run(["git", "add", *existing])
if deleted:
self._run(["git", "rm", *deleted])
except GitError as e:
raise GitError(f"Could not stage files: {e}") from e
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "devgen-cli"
version = "0.2.6"
version = "0.2.7"
description = "A collection of developer tools"
readme = "README.md"
requires-python = ">=3.10"
+1 -1
View File
@@ -6,7 +6,7 @@ from setuptools import find_packages, setup
setup(
name="devgen-cli",
version="0.2.6",
version="0.2.7",
packages=find_packages(),
include_package_data=True,
install_requires=[
Generated
+1 -1
View File
@@ -180,7 +180,7 @@ wheels = [
[[package]]
name = "devgen-cli"
version = "0.2.6"
version = "0.2.7"
source = { editable = "." }
dependencies = [
{ name = "anthropic" },