I have encountered a situation where adding the --first-parent option to git rev-list --all HEAD causes additional commits to be output. Specifically, the following command:
git rev-list --all HEAD
returns 11 commits, while the following command:
git rev-list --all --first-parent HEAD
returns 15 commits, the same 11 commits plus 4 additional commits.
The git documentation describes --first-parent as an option that limits the output, so I am wondering under what conditions it could increase the output.
I am using git version 2.48.1.
If the --all option is removed, then the --first-parent option causes some commits to be removed from the output, but it still causes some commits to be added. Specifically, the following commands:
git rev-list HEAD
git rev-list --first-parent HEAD
both return 10 commits, but only some of them (8) are common.