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

Function check_push_refs

remote.c:1547–1562  ·  view source on GitHub ↗

* Given only the set of local refs, sanity-check the set of push * refspecs. We can't catch all errors that match_push_refs would, * but we can catch some errors early before even talking to the * remote side. */

Source from the content-addressed store, hash-verified

1545 * remote side.
1546 */
1547int check_push_refs(struct ref *src, struct refspec *rs)
1548{
1549 int ret = 0;
1550 int i;
1551
1552 for (i = 0; i < rs->nr; i++) {
1553 struct refspec_item *item = &rs->items[i];
1554
1555 if (item->pattern || item->matching || item->negative)
1556 continue;
1557
1558 ret |= match_explicit_lhs(src, item, NULL, NULL);
1559 }
1560
1561 return ret;
1562}
1563
1564/*
1565 * Given the set of refs the local repository has, the set of refs the

Callers 1

transport_pushFunction · 0.85

Calls 1

match_explicit_lhsFunction · 0.85

Tested by

no test coverage detected