From: Grégoire PARIS Date: Sat, 14 Nov 2020 13:19:01 GMT Subject: phpdoc diff in git -L is not the correct one Message-ID: <348a2a4a-dfdb-190b-edac-01e9ad4c2d4d@greg0ire.fr> Hello, I have recently found out about git -L , which is great! I think I have found a bug in it though: the diff is correct on the method itself, but changes in the phpdoc of the method do not seem to be taken into account, while changes in the phpdoc of the method that follows the one I care about show up in the diff. I have attached a bug report generated with git bugreport. Regards, -- greg0ire Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue. What did you do before the bug happened? (Steps to reproduce your issue) echo '*.php diff=php' > ~/.config/git/attributes git clone git@github.com:doctrine/instantiator.git cd instantiator git log -L :instantiate:src/Doctrine/Instantiator/Instantiator.php What did you expect to happen? (Expected behavior) See changes that happened in the phpdoc of the instantiate() method appear in the log. What happened instead? (Actual behavior) I saw changes that happened in the phpdoc of the buildAndCacheFromFactory() method, which is the one right after the instantiate() method What's different between what you expected and what actually happened? The phpdoc being diffed. Anything else you want to add: Showing changes of the phpdoc of the method might not be easy to implement, but I think not showing changes of the phpdoc of the next method should be. Please review the rest of the bug report below. You can delete any lines you don't wish to share. [System Info] git version: git version 2.28.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 5.8.16-300.fc33.x86_64 #1 SMP Mon Oct 19 13:18:33 UTC 2020 x86_64 compiler info: gnuc: 10.2 libc info: glibc: 2.32 $SHELL (typically, interactive shell): /bin/zsh [Enabled Hooks] pre-commit post-commit post-checkout post-merge pre-push post-rewrite