Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

agent: Disable git pager to avoid hangs (#43277)

Oscar Villavicencio2f63543380c8
diff --git a/crates/acp_thread/src/terminal.rs b/crates/acp_thread/src/terminal.rs
index 2da4125209d..f70e044fbc1 100644
--- a/crates/acp_thread/src/terminal.rs
+++ b/crates/acp_thread/src/terminal.rs
@@ -187,8 +187,10 @@ pub async fn create_terminal_entity(
Default::default()
};
- // Disables paging for `git` and hopefully other commands
+ // Disable pagers so agent/terminal commands don't hang behind interactive UIs
env.insert("PAGER".into(), "".into());
+ // Override user core.pager (e.g. delta) which Git prefers over PAGER
+ env.insert("GIT_PAGER".into(), "cat".into());
env.extend(env_vars);
// Use remote shell or default system shell, as appropriate