I am trying to find the commit that deleted a line between between two revisions. I could not find it directly.
This is what I tried in the following:
git blame $v1..$v2 -L $line,+1 --reverse -- $file_name
then this command line returns the line that was deleted and not the commit in question. I searching for this character string using these methods:
1- Search in commits that have modified the function where the line is.
git show $commit:$file | grep -Fq "$st"
2- Searching using the character string.
git log $v1...$v2 --pretty=format:"%h" -S"$String" $file
In the first, I could not find the function containing that line (or it doesn't exist) in some cases. In the second approach, The string could be repeated in several cases and I need to review all of them.
I need a better way to find the commit that deleted the line.