summaryrefslogtreecommitdiff
path: root/src/buffer_utils.hh
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2025-02-18 09:00:14 +0100
committerMaxime Coste <mawww@kakoune.org>2025-02-18 21:07:06 +1100
commit9eda509282ebc881207c2d8278085cb53835641c (patch)
tree3fba0aecbd669a681031b4e24bd3ed850806de0f /src/buffer_utils.hh
parent72bfe0153b47196b335c51553a1707beddab69aa (diff)
rc git: fix blame in diff of deleted/renamed files
The code paths around "Missing commit line, assume it is an uncommitted change" in both blame and blame-jump code look suspiciously similar. It's possible that we can extract at least something, but there is a fundamental difference: blame-jump only jumps to another diff, while blame jumps from diff to blob, which may be a good reason for keeping them separate. More specifically, blame-jump passes « $version = "-" » because it's only interested in the parent commit/file/line, whereas blame wants to default to using the child commit/file/line (for added and context lines) and only uses the parent commit/file/line when run on deleted lines or on uncommitted changes (where HEAD is assumed to be parent commit even if there is no child). Unfortunately the blame path forgot to change to use the parent file for these; fix that and get rid of some code duplication.
Diffstat (limited to 'src/buffer_utils.hh')
0 files changed, 0 insertions, 0 deletions