Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix git diff TIMEOUT problem in swe_bench evaluation (#2828)

Bin Leic8e5848add0c
diff --git a/evaluation/swe_bench/swe_env_box.py b/evaluation/swe_bench/swe_env_box.py
index b16a74afcb..b8a95a7b5f 100644
--- a/evaluation/swe_bench/swe_env_box.py
+++ b/evaluation/swe_bench/swe_env_box.py
@@ -137,6 +137,11 @@ class SWEBenchSSHBox(DockerSSHBox):
logger.error('Failed to cd to the repo')
return ''
+ exit_code, _output = self.execute('git config --global core.pager ""')
+ if exit_code != 0:
+ logger.error('Failed to change git config')
+ return ''
+
# add everything to the index
exit_code, output = self.execute('git add -A')
if exit_code != 0: