Re: [PATCH v2] revision.c: really honor --first-parent

Previous thread: Re: [RFC/PATCH] gitweb: Paginate project list by Jakub Narebski on Tuesday, May 13, 2008 - 1:04 pm. (5 messages)

Next thread: Re: [PATCH] builtin-apply: check for empty files when detecting creation patch by Junio C Hamano on Tuesday, May 13, 2008 - 8:13 pm. (5 messages)
To: Lars Hjemli <hjemli@...>
Cc: <nanako3@...>, Stephen R. van den Berg <srb@...>, <git@...>
Date: Tuesday, May 13, 2008 - 6:38 pm

A major part of the "convoluted walk" is the (il-)logic that skipped
earlier SEEN parents and treated the first unseen one as if it was the
first parent, which is not exactly Stephen's fault. It was placed by
yours truly in the very original code but it was done without much
thought.

I think your patch is the correct fix for that convolution, regardless of
the traversal order stability issue Stephen mentions.
--

To: Junio C Hamano <gitster@...>
Cc: <nanako3@...>, Lars Hjemli <hjemli@...>, <git@...>
Date: Wednesday, May 14, 2008 - 6:34 am

I agree that Lars' patch prevents parts of the tree to go "dark" (so did
my patch).
However, without either patch, that implies that the current --first-parent
code has a high probability of obscuring parts of the tree depending on
traversing order (in any tree which contains at least one merge).

So, I'd say, since the current code does not and cannot work reliably
for anyone specifically using --first-parent (with every merge
encountered, the probability of correctness is multiplied by 0.5 at
most/least), you are going to do them a favour anyway by fixing the code,
then why not simplify the convolution and make the code rock-steady (and
implement my patch)?

Anyone using --first-parent in production now has an embarrassingly high
probability of missing commits in his generated lists (I know that I
noticed the problem within 5 minutes from actually trying to use the
flag to get meaningful output). So fixing and simplifying the code now
is rather unlikely to create any more surprises than the current code
already presents to existing users (if any).
--
Sincerely, srb@cuci.nl
Stephen R. van den Berg.

What if there were no hypothetical questions?
--

To: Stephen R. van den Berg <srb@...>
Cc: <nanako3@...>, Junio C Hamano <gitster@...>, <git@...>
Date: Wednesday, May 14, 2008 - 6:54 am

The current 'next' branch in git.git contains your patch with my fixup
on top and I believe this fixes _both_ the original issue with
first-parent (thanks to your patch) and the issue Nanako discovered
(thanks to my patch). Am I missing something?

--
larsh
--

To: Lars Hjemli <hjemli@...>
Cc: <nanako3@...>, Junio C Hamano <gitster@...>, <git@...>
Date: Wednesday, May 14, 2008 - 7:10 am

Probably not. I didn't check 'next' yet, since neither mine nor your
patch had been Acked on the list (I guess it shows that I don't know the
procedures here all too well yet).
--
Sincerely, srb@cuci.nl
Stephen R. van den Berg.

What if there were no hypothetical questions?
--

Previous thread: Re: [RFC/PATCH] gitweb: Paginate project list by Jakub Narebski on Tuesday, May 13, 2008 - 1:04 pm. (5 messages)

Next thread: Re: [PATCH] builtin-apply: check for empty files when detecting creation patch by Junio C Hamano on Tuesday, May 13, 2008 - 8:13 pm. (5 messages)