* 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. */
| 1545 | * remote side. |
| 1546 | */ |
| 1547 | int 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 |
no test coverage detected