From 55d16ff2ae8e4fbacf4fb0cfe1afed00512bde78 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Wed, 17 Jan 2024 12:52:41 +0100 Subject: [PATCH] cli: Set open file limit in remote-helper This limit is often hit when working with patches. --- radicle-remote-helper/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/radicle-remote-helper/src/lib.rs b/radicle-remote-helper/src/lib.rs index b42f305a..522ed6cd 100644 --- a/radicle-remote-helper/src/lib.rs +++ b/radicle-remote-helper/src/lib.rs @@ -122,6 +122,12 @@ pub fn run(profile: radicle::Profile) -> Result<(), Error> { let mut line = String::new(); let mut opts = Options::default(); + if let Err(e) = radicle::io::set_file_limit(4096) { + if debug { + eprintln!("git-remote-rad: unable to set open file limit: {e}"); + } + } + loop { let tokens = read_line(&stdin, &mut line)?;