Skip to content

Commit

Permalink
fix: skip diff if hashes are the same
Browse files Browse the repository at this point in the history
  • Loading branch information
18alantom committed Sep 19, 2024
1 parent a34a647 commit eab0f2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,11 @@ def _pull_app_change(self, app: BenchUpdateApp) -> list[str]:
new_hash: str = app["hash"]
old_hash: str = exec("git rev-parse HEAD")["output"]

if old_hash == new_hash:
# Remove remote, url might be private
exec(f"git remote remove {remote}")
return []

# Fetch new hash and get changed files
exec(f"git fetch --depth 1 {remote} {new_hash}")
diff: str = exec(f"git diff --name-only {old_hash} {new_hash}")["output"]
Expand Down

0 comments on commit eab0f2e

Please sign in to comment.