From 4f80e5cb547ce310d8979978e351f5fb0f75c03e Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Thu, 6 Mar 2025 08:51:33 +0100 Subject: [PATCH] Remove assertion about history items For unknown reasons this assertion fails. This means that 1b9b893169 (After reading corrupted history entry, keep reading older entries, 2024-10-06) is not fully working. Go back to historical behavior for now. Closes #11236 --- src/history/file.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/history/file.rs b/src/history/file.rs index 5a223cf82..7afa5a429 100644 --- a/src/history/file.rs +++ b/src/history/file.rs @@ -369,7 +369,9 @@ fn extract_prefix_and_unescape_yaml(line: &[u8]) -> Option<(Cow<[u8]>, Cow<[u8]> fn decode_item_fish_2_0(mut data: &[u8]) -> Option { let (advance, line) = read_line(data); let line = trim_start(line); - assert!(line.starts_with(b"- cmd")); + if !line.starts_with(b"- cmd") { + return None; + } let (_key, value) = extract_prefix_and_unescape_yaml(line)?;