-static void debug_queue(const char *msg, struct diff_queue_struct *q)
-{
- int i;
- if (msg)
- fprintf(stderr, "%s\n", msg);
- fprintf(stderr, "q->nr = %d\n", q->nr);
- for (i = 0; i < q->nr; i++) {
- struct diff_filepair *p = q->queue[i];
- debug_filepair(p, i);
- }
-}
-#else
-#define debug_queue(a,b) do { ; /*nothing*/ } while(0)
-#endif
-
-/*
- * We sort the outstanding diff entries according to the rank (see
- * comment at the beginning of record_rename_pair) and tiebreak with
- * the order in the original input.
- */
-static int rank_compare(const void *a_, const void *b_)
-{
- const struct diff_filepair *a = *(const struct diff_filepair **)a_;
- const struct diff_filepair *b = *(const struct diff_filepair **)b_;
- int a_rank = a->rename_rank;
- int b_rank = b->rename_rank;
-
- if (a_rank != b_rank)
- return a_rank - b_rank;
- return a->orig_order - b->orig_order;
+ dp = diff_queue(NULL, one, two);
+ dp->score = score;
+ dp->source_stays = rename_src[src_index].src_path_left;
+ rename_dst[dst_index].pair = dp;