Pushkar Singh [off-list ref] writes:
+static int transfer_debug_enabled = -1;
...
- if (debug_enabled < 0)
- debug_enabled = getenv("GIT_TRANSLOOP_DEBUG") ? 1 : 0;
- if (!debug_enabled)
+ if (!transfer_debug_enabled)
return;
Would it be possible that transfer_debug_enabled is still -1 at this
point? We would proceed in such a case, which is a bit different from
what would have happened in the original.
Perhaps
if (transfer_debug_enabled <= 0)
return;
is what you want? I dunno.
quoted hunk ↗ jump to hunk
@@ -1648,6 +1640,9 @@ int bidirectional_transfer_loop(int input, int output)
{
struct bidirectional_transfer_state state;
+ if (transfer_debug_enabled < 0)
+ transfer_debug_enabled = getenv("GIT_TRANSLOOP_DEBUG") ? 1 : 0;
+
/* Fill the state fields. */
state.ptg.src = input;
state.ptg.dest = 1;