MCPcopy Create free account
hub / github.com/git/git / diffcore_skip_stat_unmatch

Function diffcore_skip_stat_unmatch

diff.c:7396–7421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7394}
7395
7396static 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
7423static int diffnamecmp(const void *a_, const void *b_)
7424{

Callers 1

diffcore_stdFunction · 0.85

Calls 3

diff_qFunction · 0.85
diff_free_filepairFunction · 0.85

Tested by

no test coverage detected