1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-25 21:16:38 +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() { run_git_blame() {
if [ "${kak_opt_git_blame_flags#* *}" != "${kak_opt_git_blame_flags}" ]; then echo >${kak_command_fifo} "try %{
hide_blame add-highlighter window/git-blame flag-lines Information git_blame_flags
exit echo -to-file ${kak_response_fifo}
fi } catch %{
echo -to-file ${kak_response_fifo} 'hide_blame; exit'
}"
eval $(cat ${kak_response_fifo})
( (
cd_bufdir cd_bufdir
printf %s "evaluate-commands -client '$kak_client' %{ 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' set-option buffer=$kak_bufname git_blame_flags '$kak_timestamp'
}" | kak -p ${kak_session} }" | kak -p ${kak_session}
git blame "$@" --incremental ${kak_buffile} | perl -wne ' git blame "$@" --incremental ${kak_buffile} | perl -wne '