threads / discuss / 48851

Git log command doesn't run as expected.

Subject: Git log command doesn't run as expected.

## tl;dr

2 messages between Jul 10, 2018 and Jul 10, 2018.

replies: 1people: 2as markdown or json

周应天· Jul 10, 2018, 11:16 UTC · lore
Hi,
	I’m using following command to do some search work:
	git log --all -G 'some regexp' -p — path/to/my/file.
But the output could miss some commit. (For example, I grep a little piece of code from a commit diff message(properly handled for regexp), but when I use the command above to search that code, I could not get that commit.)
	I wonder that it is because I use it in a wrong way? Then what should I do to correct it.
																							Thanks!
Ævar Arnfjörð Bjarmason· Jul 10, 2018, 12:18 UTC · re: 周应天 · lore

Re: Git log command doesn't run as expected.

On Tue, Jul 10, 2018 at 1:16 PM, 周应天 <zhoudao200@126.com> wrote:
Show 5 quoted lines
> Hi,
>         I’m using following command to do some search work:
>         git log --all -G 'some regexp' -p — path/to/my/file.
> But the output could miss some commit. (For example, I grep a little piece of code from a commit diff message(properly handled for regexp), but when I use the command above to search that code, I could not get that commit.)
>         I wonder that it is because I use it in a wrong way? Then what should I do to correct it.
Have you tried with --full-history? Does that find what you're looking for?

← back to recent threads