From 3116850688dbfbf28f9eeba59e2cbded16c3b3fc Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Thu, 20 Feb 2025 13:53:37 -0500 Subject: [PATCH] git: Take only the first line of MERGE_MSG (#25263) The rest of the generated message consists of comments that are redundant with what we show in the panel. Release Notes: - N/A --- crates/worktree/src/worktree.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/worktree/src/worktree.rs b/crates/worktree/src/worktree.rs index c99bcd4356..402567cf8c 100644 --- a/crates/worktree/src/worktree.rs +++ b/crates/worktree/src/worktree.rs @@ -5491,7 +5491,8 @@ impl BackgroundScanner { entry.merge_message = std::fs::read_to_string( local_repository.dot_git_dir_abs_path.join("MERGE_MSG"), ) - .ok(); + .ok() + .and_then(|merge_msg| Some(merge_msg.lines().next()?.to_owned())); entry.status_scan_id += 1; }, );