diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2025-03-23 16:01:53 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-03-24 08:22:14 +1100 |
| commit | d433eb27c9944af33cd01acbef14a0220ad55251 (patch) | |
| tree | 87c9dc524ca896d421c65ae983faf59336993a24 /Makefile | |
| parent | 796ccc45f0bcabb31c1ac5df36d2ced082ad294d (diff) | |
rc git: blame to not hide error when cd_bufdir fails
Running "git blame" in a scratch buffer echoes "Press <ret> to jump
to blamed commit" even though the blaming clearly fails. The failure
is silent because cd_bufdir exits the shell, so we don't even attempt
to run "git blame". cd_bufdir prints a "fail" command stdout but that
goes to /dev/null in this case.
I don't really understand why 891a9f5fe (Merge remote-tracking branch
'lenormf/fix-git-tools', 2019-09-22) moved cd_bufdir inside this
background subshell. I guess it didn't matter as much back then when
we didn't have the "Press <ret> to jump" message. Also the existing
error message printed by cd_bufdir for scratch buffers is confusing.
Fail as early as possible, showing a suitable error. Note that "git blame"
does work in filetype=git-diff and filetype=git-log buffers, so don't attempt
cd_bufdir inside those.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions
