* Copies data from stdin to output and from input to stdout simultaneously. * Additionally filtering through given filter. If filter is NULL, uses * identity filter. */
| 1639 | * identity filter. |
| 1640 | */ |
| 1641 | int bidirectional_transfer_loop(int input, int output) |
| 1642 | { |
| 1643 | struct bidirectional_transfer_state state; |
| 1644 | |
| 1645 | if (transfer_debug_enabled < 0) |
| 1646 | transfer_debug_enabled = getenv("GIT_TRANSLOOP_DEBUG") ? 1 : 0; |
| 1647 | |
| 1648 | /* Fill the state fields. */ |
| 1649 | state.ptg.src = input; |
| 1650 | state.ptg.dest = 1; |
| 1651 | state.ptg.src_is_sock = (input == output); |
| 1652 | state.ptg.dest_is_sock = 0; |
| 1653 | state.ptg.state = SSTATE_TRANSFERRING; |
| 1654 | state.ptg.bufuse = 0; |
| 1655 | state.ptg.src_name = "remote input"; |
| 1656 | state.ptg.dest_name = "stdout"; |
| 1657 | |
| 1658 | state.gtp.src = 0; |
| 1659 | state.gtp.dest = output; |
| 1660 | state.gtp.src_is_sock = 0; |
| 1661 | state.gtp.dest_is_sock = (input == output); |
| 1662 | state.gtp.state = SSTATE_TRANSFERRING; |
| 1663 | state.gtp.bufuse = 0; |
| 1664 | state.gtp.src_name = "stdin"; |
| 1665 | state.gtp.dest_name = "remote output"; |
| 1666 | |
| 1667 | return tloop_spawnwait_tasks(&state); |
| 1668 | } |
| 1669 | |
| 1670 | void reject_atomic_push(struct ref *remote_refs, int mirror_mode) |
| 1671 | { |
no test coverage detected