{"thread":{"id":"57324","subject":"git log bug: -n flag doesn't work with --follow","startedAt":"2022-01-27T21:59:42Z","lastAt":"2022-01-27T21:59:42Z","messageCount":1,"participants":["John Rocha"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"447139","messageId":"BYAPR20MB27282CFEA29DA37516CE38E3B4219@BYAPR20MB2728.namprd20.prod.outlook.com","threadId":"57324","inReplyTo":null,"subject":"git log bug: -n flag doesn't work with --follow","fromName":"John Rocha","fromEmail":"rocha@stratovan.com","sentAt":"2022-01-27T21:59:39Z","receivedAt":"2022-01-27T21:59:42Z","isPatch":false,"sender":{"key":"rocha@stratovan.com","avatar":null},"body":"I was attempting to find the oldest commit for a file that has been moved.\n\nI can get the entire list by using the command\n\n$ git log --reverse --follow -- <filename>\n\nHowever if I add  the option \"-n 1\" or \"--max-count=1\" to see JUST the last entry, the command displays nothing\n\nIf I remove --follow, it will display the oldest entry for this file in its current location.\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\ngit log --reverse --follow -n 1 -- <filename>\ngit log --reverse --follow --max-count=1 -- <filename>\n\nWhat did you expect to happen? (Expected behavior)\n\nI expected to see the oldest commit information for the file, following it through renames.\n\nWhat happened instead? (Actual behavior)\n\nNothing was displayed.\n\nWhat's different between what you expected and what actually happened?\n\nI expected to see the appropriate information.\n\nAnything else you want to add:\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.33.1.windows.1\ncpu: x86_64\nbuilt from commit: 05d80adb775077d673fab685009ede4a1003ed92\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Windows 10.0 19043\ncompiler info: gnuc: 10.3\nlibc info: no libc information available\n$SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n\n\n[Enabled Hooks]\n\n\n"}]}