2 years ago
#68029

LF00
git log -L cannot show the function history
I use git log -L :functionname:path
to show a function history. But it show nothing even when the functionname is in the file.
Here is the gitattributes config
$ cat ~/.gitattributes
*.php diff=php
With grep, it shows the funcitonname in the file file.
$ grep newSearchByNameSongList app/Http/Controllers/SongController.php
public function newSearchByNameSongList(Request $request) {
But git log -L cannot match it
$ git log -L :newSearchByNameSongList:app/Http/Controllers/SongController.php
fatal: -L parameter 'newSearchByNameSongList' starting at line 1: no match
Here is the git version.
$ git version
git version 2.34.1.windows.1
php
git
function
logging
history
0 Answers
Your Answer