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

Function bidirectional_transfer_loop

transport-helper.c:1641–1668  ·  view source on GitHub ↗

* Copies data from stdin to output and from input to stdout simultaneously. * Additionally filtering through given filter. If filter is NULL, uses * identity filter. */

Source from the content-addressed store, hash-verified

1639 * identity filter.
1640 */
1641int 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
1670void reject_atomic_push(struct ref *remote_refs, int mirror_mode)
1671{

Callers 2

run_childFunction · 0.85
command_loopFunction · 0.85

Calls 1

tloop_spawnwait_tasksFunction · 0.85

Tested by

no test coverage detected