From 5f25bc0ebd8329f890934722646e23d482488810 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Fri, 11 Aug 2023 08:21:29 -0700 Subject: [PATCH] Rename information in header should only be shown on first hunk Fixes #553 --- src/display/style.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display/style.rs b/src/display/style.rs index bd4f58d7e..60c69ed95 100644 --- a/src/display/style.rs +++ b/src/display/style.rs @@ -476,11 +476,11 @@ pub fn header( } match old_path { - Some(old_path) => { + Some(old_path) if hunk_num == 1 => { let renamed = format!("Renamed from {} to {}", old_path, display_path); format!("{}{}\n{}", display_path_pretty, trailer, renamed) } - None => { + _ => { format!("{}{}", display_path_pretty, trailer) } }