From c714d0587567d67e1c3702e44221c1b46dc969ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Tue, 10 Nov 2020 12:38:27 +0100 Subject: blame: silently ignore invalid ignore file objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 610e2b9240 (blame: validate and peel the object names on the ignore list, 2020-09-24) git blame reports checks if objects specified with --ignore-rev and in files loaded with --ignore-revs-file and config option blame.ignoreRevsFile are actual objects and dies if they aren't. The intent is to report typos to the user. This also breaks the ability to use a single ignore file for multiple repositories. Typos are presumably less likely in files than on the command line, so alerting is less useful here. Restore that feature by skipping non-commits without dying. Reported-by: Jean-Yves Avenard Signed-off-by: René Scharfe Reviewed-by: Barret Rhoden Signed-off-by: Junio C Hamano --- t/t8013-blame-ignore-revs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/t8013-blame-ignore-revs.sh b/t/t8013-blame-ignore-revs.sh index 24ae5018e8..b18633dee1 100755 --- a/t/t8013-blame-ignore-revs.sh +++ b/t/t8013-blame-ignore-revs.sh @@ -39,10 +39,10 @@ test_expect_success 'validate --ignore-rev' ' test_must_fail git blame --ignore-rev X^{tree} file ' -# Ensure bogus --ignore-revs-file requests are caught +# Ensure bogus --ignore-revs-file requests are silently accepted test_expect_success 'validate --ignore-revs-file' ' git rev-parse X^{tree} >ignore_x && - test_must_fail git blame --ignore-revs-file ignore_x file + git blame --ignore-revs-file ignore_x file ' for I in X XT -- cgit v1.2.3