We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bf38f34 + d09b3fa commit 0414fc8Copy full SHA for 0414fc8
1 file changed
agentstack/repo.py
@@ -1,11 +1,10 @@
1
from typing import Optional
2
+from types import ModuleType
3
from pathlib import Path
4
import shutil
-import git
5
from agentstack import conf, log
6
from agentstack.exceptions import EnvironmentError
7
8
-
9
MAIN_BRANCH_NAME = "main"
10
11
AUTOMATION_NOTE = "\n\n(This commit was made automatically by AgentStack)"
@@ -15,6 +14,14 @@
15
14
_USE_GIT = None # global state to disable git for this run
16
17
+# The python git module prints an excessive error message when git is not
18
+# installed. We always want to allow git support to fail silently.
19
+try:
20
+ import git
21
+except ImportError:
22
+ _USE_GIT = False
23
+
24
25
def should_track_changes() -> bool:
26
"""
27
If git has been disabled for this run, return False. Next, look for the value
0 commit comments