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

Function still_interesting

revision.c:1298–1320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1296#define SLOP 5
1297
1298static int still_interesting(struct prio_queue *src, timestamp_t date, int slop,
1299 struct commit **interesting_cache)
1300{
1301 /*
1302 * Since src is sorted by date, it is enough to peek at the
1303 * first entry to compare dates. No entry at all means done.
1304 */
1305 struct commit *commit = prio_queue_peek(src);
1306 if (!commit)
1307 return 0;
1308 if (date <= commit->date)
1309 return SLOP;
1310
1311 /*
1312 * Does the source list still have interesting commits in
1313 * it? Definitely not done..
1314 */
1315 if (!everybody_uninteresting(src, interesting_cache))
1316 return SLOP;
1317
1318 /* Ok, we're closing in.. */
1319 return slop-1;
1320}
1321
1322/*
1323 * "rev-list --ancestry-path=C_0 [--ancestry-path=C_1 ...] A..B"

Callers 1

limit_listFunction · 0.85

Calls 2

prio_queue_peekFunction · 0.85
everybody_uninterestingFunction · 0.85

Tested by

no test coverage detected