]> git.ipfire.org Git - thirdparty/git.git/commit
blame: print unblamable and ignored commits in porcelain mode
authorKarthik Nayak <karthik.188@gmail.com>
Thu, 3 Apr 2025 16:03:26 +0000 (18:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Apr 2025 21:50:18 +0000 (14:50 -0700)
commit4d253071ddd44ee5fad88702431603d43215b3af
treece6cc33e93aab1fea6e5a526847d231fbd05f768
parent683c54c999c301c2cd6f715c411407c413b1d84e
blame: print unblamable and ignored commits in porcelain mode

The 'git-blame(1)' command allows users to ignore specific revisions via
the '--ignore-rev <rev>' and '--ignore-revs-file <file>' flags. These
flags are often combined with the 'blame.markIgnoredLines' and
'blame.markUnblamableLines' config options. These config options prefix
ignored and unblamable lines with a '?' and '*', respectively.

However, this option was never extended to the porcelain mode of
'git-blame(1)'. Since the documentation does not indicate this
exclusion, it is a bug.

Fix this by printing 'ignored' and 'unblamable' respectively for the
options when using the porcelain modes.

Helped-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Toon Claes <toon@iotcl.com>
Helped-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/blame-options.adoc
Documentation/git-blame.adoc
builtin/blame.c
t/t8013-blame-ignore-revs.sh