M
M
mshakurov2014-10-10 12:39:07
git
mshakurov, 2014-10-10 12:39:07

What am I misunderstanding about the git log -p --grep command?

We use git. The task is to find a substring throughout the history of commits.
I'm running Git Bash.
I enter the command:
git log -p
I see that there is a substring in the commits: prAfterEdit I interrupt
the output.
I enter the command:
git log -p --grep=prAfterEdit
or I
git log -p --grep=prAfterEdit -i
try different combinations: using the -i and -F options, quoting the string
In any case, I get an empty output.
What's wrong?
Some lines are found in this way, some are not, it is impossible to understand the difference in behavior. All the lines you are looking for are definitely in the log.
It is not interesting to output the full log to a file, and then search the file by hand.
I would like to perform a quick search and get a highlighted output right in the bash window. You need to do this often. Naturally, I assume the use of full-fledged regular expressions, git log options for limiting, etc. etc.
Can you recommend a good tool for such a search? It's not even important for me to filter branches and revisions, I need frequent searches in the full log.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question