mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
Merge f3127bb50a into c7d62b3fe3
This commit is contained in:
commit
5d68d29fdd
2 changed files with 51 additions and 6 deletions
11
cli.py
11
cli.py
|
|
@ -917,11 +917,16 @@ def _cleanup_worktree(info: Dict[str, str] = None) -> None:
|
|||
# but didn't push.
|
||||
has_unpushed = False
|
||||
try:
|
||||
result = subprocess.run(
|
||||
["git", "log", "--oneline", "HEAD", "--not", "--remotes"],
|
||||
remote_refs = subprocess.run(
|
||||
["git", "for-each-ref", "--format=%(refname)", "refs/remotes"],
|
||||
capture_output=True, text=True, timeout=10, cwd=wt_path,
|
||||
)
|
||||
has_unpushed = bool(result.stdout.strip())
|
||||
if remote_refs.stdout.strip():
|
||||
result = subprocess.run(
|
||||
["git", "log", "--oneline", "HEAD", "--not", "--remotes"],
|
||||
capture_output=True, text=True, timeout=10, cwd=wt_path,
|
||||
)
|
||||
has_unpushed = bool(result.stdout.strip())
|
||||
except Exception:
|
||||
has_unpushed = True # Assume unpushed on error — don't delete
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue