kakoune/rc
Johannes Altmanninger 4e13fbef0a rc tools git: support blame in git-diff and git-log buffers
Today we can recursively search history with "git blame-jump". However
that command has some drawbacks, mainly that it's blocking. Making
it async without any progress indicator might be confusing. Better
to run plain "git blame"[1] and press Enter.

Also it might be nice to enable recursive searches using only "git
blame" and `<ret>` (since that is bound to "git blame-jump" while
blame annotations are displayed).

Make "git blame" in git-diff/git-log buffers run "git show
$commit:$file" for the commit and file at cursor, and decorate this
blob view with blame annotations. The latter allows to use `<ret>`
and repeat.

Unfortunately this relies on a hidden option "git_blob" to keep the
commit ID and filename. Maybe we can put this metadata somewhere
else like the buffer name or contents, ideally in a way that survives
serialization.

I'd still keep "git blame-jump" because it seems faster for the common
case of tracking down a single line.

[1]: In my testing, "git blame --incremental" is not any slower than
"git blame -L123,123" at finding that line.
2024-02-05 21:42:02 +11:00
..
detection rc detection modeline: optimize modeline pre-filtering 2023-06-02 22:38:32 +02:00
filetype rc tools git: command for easy recursive blaming 2024-02-05 21:42:02 +11:00
tools rc tools git: support blame in git-diff and git-log buffers 2024-02-05 21:42:02 +11:00
windowing rc windowing: with-option to restore option value also after error 2023-12-16 12:13:20 +01:00