Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kaddkaka opened this issue Aug 1, 2024 · 5 comments
Closed

Comments

@kaddkaka
Copy link

kaddkaka commented Aug 1, 2024

git log -L:function_name:file_name is really nice to see changes to a function. The default behavior is to only show the part of the commit that actually touches that function (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 kaddkaka changed the title How to now show full diff when using Gclog -L to track changes in a function How to not show full diff when using Gclog -L to track changes in a function Aug 1, 2024
@kaddkaka
Copy link
Author

kaddkaka commented Aug 2, 2024

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

@ikiet
Copy link

ikiet commented Mar 8, 2025

@kaddkaka
Same question here. Did you find the answer?

@kaddkaka
Copy link
Author

kaddkaka commented Mar 8, 2025

I did not, I guess the fastest answer might be to study fugitive source code

@ikiet
Copy link

ikiet commented Mar 8, 2025

Thank you. But I’m not familiar with Vimscript.

@tpope
Copy link
Owner

tpope commented Mar 8, 2025

:Gclog can't do this. :Git log is more flexible, it can do anything Git can.

@tpope tpope closed this as completed Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants