# git log bug: -n flag doesn't work with --follow

1 messages from 2022-01-27 to 2022-01-27. Participants: John Rocha.
Thread: https://gitlist.dev/t/57324

## John Rocha, 2022-01-27 21:59

Subject: git log bug: -n flag doesn't work with --follow
Message-ID: <BYAPR20MB27282CFEA29DA37516CE38E3B4219@BYAPR20MB2728.namprd20.prod.outlook.com>
URL: https://gitlist.dev/e/BYAPR20MB27282CFEA29DA37516CE38E3B4219%40BYAPR20MB2728.namprd20.prod.outlook.com

```
I was attempting to find the oldest commit for a file that has been moved.

I can get the entire list by using the command

$ git log --reverse --follow -- <filename>

However if I add  the option "-n 1" or "--max-count=1" to see JUST the last entry, the command displays nothing

If I remove --follow, it will display the oldest entry for this file in its current location.

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

git log --reverse --follow -n 1 -- <filename>
git log --reverse --follow --max-count=1 -- <filename>

What did you expect to happen? (Expected behavior)

I expected to see the oldest commit information for the file, following it through renames.

What happened instead? (Actual behavior)

Nothing was displayed.

What's different between what you expected and what actually happened?

I expected to see the appropriate information.

Anything else you want to add:

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.33.1.windows.1
cpu: x86_64
built from commit: 05d80adb775077d673fab685009ede4a1003ed92
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Windows 10.0 19043
compiler info: gnuc: 10.3
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe


[Enabled Hooks]



```
