I believe I have found a bug -
My repo has a commit structure like
R2 |\ | F |/ R1
i.e. - there is a merge commit R2 with parents R1 and F - the parent of F is R1
I ran "git rev-list --exclude-first-parent-only F ^R2"
it gave the expected result: "F"
I ran "git rev-list --exclude-first-parent-only F R1 ^R2"
I expected the same result, but I got an unexpected result - nothing at all
Suspected cause - I had a look at the code, and it looks like process_parents() in revision.c, when processing uninteresting flags, will skip the 1st parent and mark the 2nd parent as uninteresting if the 1st parent is already SEEN, even with the flag exclude-first-parent-only. I think maybe explicitly selecting R1 on the command line causes it to be marked SEEN before ^R2 is processed, thus resulting in F being marked uninteresting.
[System Info] git version: git version 2.54.0.windows.1 cpu: x86_64 built from commit: 2b8a3ab140826ac423c2845ef81d4c6ac4f7bf3c sizeof-long: 4 sizeof-size_t: 8 shell-path: D:/git-sdk-64-build-installers/usr/bin/sh rust: disabled feature: fsmonitor--daemon gettext: enabled SHA-1: SHA1_DC SHA-256: SHA256_BLK default-ref-format: files default-hash: sha1
[Enabled Hooks]
Regards, Michael
Please consider the environment before printing this document.
Information collected by ASIC may contain personal information. Please refer to our Privacy Policy<https://asic.gov.au/privacy/> for information about how we handle your personal information, your rights to seek access to and correct your personal information, and how to complain about breaches of your privacy by ASIC.
This e-mail and any attachments are intended for the addressee(s) only and may be confidential. They may contain legally privileged, copyright material or personal and /or confidential information. You should not read, copy, use or disclose the content without authorisation. If you have received this email in error, please notify the sender as soon as possible, delete the email and destroy any copies. This notice should not be removed.