clan-cli: add git.commit_file() to auto commit files if inside a git

- commit only if inside a git repo
- commit only the specified file and nothing else
- auto-generate commit message if not specified
This commit is contained in:
DavHau
2023-09-21 14:07:54 +02:00
parent 8e157f891f
commit 6a359c0a2f
8 changed files with 131 additions and 5 deletions

View File

@@ -28,6 +28,7 @@ example_options = f"{Path(config.__file__).parent}/jsonschema/options.json"
def test_set_some_option(
args: list[str],
expected: dict[str, Any],
test_flake: Path,
) -> None:
# create temporary file for out_file
with tempfile.NamedTemporaryFile() as out_file: