# Git log command doesn't run as expected.

2 messages from 2018-07-10 to 2018-07-10. Participants: 周应天, Ævar Arnfjörð Bjarmason.
Thread: https://gitlist.dev/t/48851

## 周应天, 2018-07-10 11:16

Subject: Git log command doesn't run as expected.
Message-ID: <F261A512-F38D-45F2-8F4F-A932B9BEA6A1@126.com>
URL: https://gitlist.dev/e/F261A512-F38D-45F2-8F4F-A932B9BEA6A1%40126.com

```
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, 2018-07-10 12:18

Subject: Re: Git log command doesn't run as expected.
Message-ID: <CACBZZX7_iiVu6scdpc4z-rG3wwjC-cwwOOO88vjwKGYqe2FTWQ@mail.gmail.com>
URL: https://gitlist.dev/e/CACBZZX7_iiVu6scdpc4z-rG3wwjC-cwwOOO88vjwKGYqe2FTWQ%40mail.gmail.com
In-Reply-To: <F261A512-F38D-45F2-8F4F-A932B9BEA6A1@126.com>

```
On Tue, Jul 10, 2018 at 1:16 PM, 周应天 <zhoudao200@126.com> wrote:
> 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?

```
