git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug when git rev-list options "--first-parent" and "--ancestry-path" are used together?
@ 2013-05-23 10:07 Michael Haggerty
  2013-05-23 17:20 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Haggerty @ 2013-05-23 10:07 UTC (permalink / raw)
  To: git, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

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@alum.mit.edu
http://softwareswirl.blogspot.com/

[-- Attachment #2: x.sh --]
[-- Type: application/x-sh, Size: 548 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-25 19:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 10:07 Bug when git rev-list options "--first-parent" and "--ancestry-path" are used together? Michael Haggerty
2013-05-23 17:20 ` Junio C Hamano
2013-05-25 18:40   ` Michael Haggerty
     [not found]   ` <519F0B2F.3090701@alum.mit.edu>
     [not found]     ` <7v4nds9rhh.fsf@alter.siamese.dyndns.org>
2013-05-25 19:54       ` Michael Haggerty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).