1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-08-17 00:30:26 +03:00

rc tools git: fix regression hiding blame in large files

Sorry I did not test my earlier patch in production.  It passes
blame flags via the environment.  On a 5000 line file this results in
"execve failed: Argument list too long" errors.

Use a different way of checking whether blame info is shown.
This commit is contained in:
Johannes Altmanninger 2024-01-22 15:39:50 +01:00 committed by Maxime Coste
parent 52bf8d343b
commit 6eb3d1baf5

View File

@ -159,14 +159,16 @@ define-command -params 1.. \
}
run_git_blame() {
if [ "${kak_opt_git_blame_flags#* *}" != "${kak_opt_git_blame_flags}" ]; then
hide_blame
exit
fi
echo >${kak_command_fifo} "try %{
add-highlighter window/git-blame flag-lines Information git_blame_flags
echo -to-file ${kak_response_fifo}
} catch %{
echo -to-file ${kak_response_fifo} 'hide_blame; exit'
}"
eval $(cat ${kak_response_fifo})
(
cd_bufdir
printf %s "evaluate-commands -client '$kak_client' %{
try %{ add-highlighter window/git-blame flag-lines Information git_blame_flags }
set-option buffer=$kak_bufname git_blame_flags '$kak_timestamp'
}" | kak -p ${kak_session}
git blame "$@" --incremental ${kak_buffile} | perl -wne '