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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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]






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux