Bug when git rev-list options "--first-parent" and "--ancestry-path" are used together?

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

 



It seems to me that

     git rev-list --first-parent --ancestry-path A..B

is well-defined and should list the commits in the intersection between

     git rev-list --first-parent                 A..B

and

     git rev-list                --ancestry-path A..B

But in many cases the first command doesn't provide any output even
though there are commits common to the output of the last two commands.

For example, take as an example the DAG from test t6019:

#          D---E-------F
#         /     \       \
#    B---C---G---H---I---J
#   /                     \
#  A-------K---------------L--M

(The merges are always downwards; e.g., the first parent of commit L is
K.)  The command

    git rev-list --first-parent --ancestry-path D..J

doesn't generate any output, whereas I would expect it to output "H I
J".  Similarly,

    git rev-list --first-parent --ancestry-path D..M

doesn't generate any output, whereas I would expect it to output "L M".

For fun, the attached script computes the output for all commit pairs in
this DAG and outputs the discrepancies that it finds.  (It should be run
in directory "t/trash directory.t6019-rev-list-ancestry-path" after
t6019 was run with "-d".)

Is this a bug or are my expectations wrong?

Michael

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx
http://softwareswirl.blogspot.com/

Attachment: x.sh
Description: Bourne shell script


[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]