| 7394 | } |
| 7395 | |
| 7396 | static void diffcore_skip_stat_unmatch(struct diff_options *diffopt) |
| 7397 | { |
| 7398 | int i; |
| 7399 | struct diff_queue_struct *q = &diff_queued_diff; |
| 7400 | struct diff_queue_struct outq = DIFF_QUEUE_INIT; |
| 7401 | |
| 7402 | for (i = 0; i < q->nr; i++) { |
| 7403 | struct diff_filepair *p = q->queue[i]; |
| 7404 | |
| 7405 | if (diff_filespec_check_stat_unmatch(diffopt->repo, p)) |
| 7406 | diff_q(&outq, p); |
| 7407 | else { |
| 7408 | /* |
| 7409 | * The caller can subtract 1 from skip_stat_unmatch |
| 7410 | * to determine how many paths were dirty only |
| 7411 | * due to stat info mismatch. |
| 7412 | */ |
| 7413 | if (!diffopt->flags.no_index) |
| 7414 | diffopt->skip_stat_unmatch++; |
| 7415 | diff_free_filepair(p); |
| 7416 | q->queue[i] = NULL; |
| 7417 | } |
| 7418 | } |
| 7419 | free(q->queue); |
| 7420 | *q = outq; |
| 7421 | } |
| 7422 | |
| 7423 | static int diffnamecmp(const void *a_, const void *b_) |
| 7424 | { |
no test coverage detected