* [PATCH] Restore expected list order for --merge-order switch
@ 2005-07-05 1:06 Jon Seymour
2005-07-05 23:21 ` Jon Seymour
0 siblings, 1 reply; 3+ messages in thread
From: Jon Seymour @ 2005-07-05 1:06 UTC (permalink / raw)
To: git; +Cc: torvalds, jon.seymour
A recent change to rev-list altered the order in which start points
are presented to the merge-order sort algorithm. This caused
breaks in the t/t6001 unit tests.
This change restores the order in which start points are presented to the
the merge-order sort algorithm (but leaves the order unchanged from
the immediately preceding behaviour for non --merge-order sorts).
The order in which arguments are presented to the merge-order
sort algorithm is significant, since left-most arguments
are expected to sort last so as to be consistent with
how left-most parents sort.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
rev-list.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
ed4451af196ea31ec0c6c7f663290a9b325482cd
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -482,7 +482,10 @@ int main(int argc, char **argv)
commit = get_commit_reference(arg, flags);
if (!commit)
continue;
- insert_by_date(&list, commit);
+ if (!merge_order)
+ insert_by_date(&list, commit);
+ else
+ commit_list_insert(commit, &list);
}
if (!merge_order) {
------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Restore expected list order for --merge-order switch
2005-07-05 1:06 [PATCH] Restore expected list order for --merge-order switch Jon Seymour
@ 2005-07-05 23:21 ` Jon Seymour
2005-07-05 23:43 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Jon Seymour @ 2005-07-05 23:21 UTC (permalink / raw)
To: git; +Cc: torvalds, jon.seymour
G'day Linus,
Is there some reason why this didn't get applied?
jon.
On 7/5/05, Jon Seymour <jon.seymour@gmail.com> wrote:
>
> A recent change to rev-list altered the order in which start points
> are presented to the merge-order sort algorithm. This caused
> breaks in the t/t6001 unit tests.
>
> This change restores the order in which start points are presented to the
> the merge-order sort algorithm (but leaves the order unchanged from
> the immediately preceding behaviour for non --merge-order sorts).
>
> The order in which arguments are presented to the merge-order
> sort algorithm is significant, since left-most arguments
> are expected to sort last so as to be consistent with
> how left-most parents sort.
>
> Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Restore expected list order for --merge-order switch
2005-07-05 23:21 ` Jon Seymour
@ 2005-07-05 23:43 ` Linus Torvalds
0 siblings, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2005-07-05 23:43 UTC (permalink / raw)
To: jon; +Cc: git, jon.seymour
On Wed, 6 Jul 2005, Jon Seymour wrote:
>
> Is there some reason why this didn't get applied?
I think it's horribly horribly ugly.
I really don't see the point of argument ordering mattering, and I think
the test is broken. Convince me otherwise.
Linus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-05 23:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-05 1:06 [PATCH] Restore expected list order for --merge-order switch Jon Seymour
2005-07-05 23:21 ` Jon Seymour
2005-07-05 23:43 ` Linus Torvalds
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).