tpope / vim-fugitive

fugitive.vim: A Git wrapper so awesome, it should be illegal
https://www.vim.org/scripts/script.php?script_id=2975
20.03k stars 1.01k forks source link

How to not show full diff when using `Gclog -L` to track changes in a function #2325

Open kaddkaka opened 3 months ago

kaddkaka commented 3 months ago

git log -L:function_name:file_name is really nice to see changed to a function. The default behavior is to only show the part of the commit that actually touches that fill (as opposed to --full-diff, which doesn't even seem to work together with -L in git version 2.35.1)

Gclog -L:function_name:file_name works great and it's nice to get 2 entries for each commit

  1. The full commit (commit message and all changes done in this commit)
  2. The function source code at that specific commit

For entries of type 1., is it possible to reduce the content of that buffer to only show the changes in the tracked function? (just as git log -L from the command line does)

kaddkaka commented 3 months ago

Same question for :Gclog %: can it be made to only show the diff of the selected file (%)?