remote-curl: reduce scope of rpc_state.stdin_preamble
authorJonathan Tan <jonathantanmy@google.com>
Thu, 14 Feb 2019 19:06:36 +0000 (11:06 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Feb 2019 20:47:55 +0000 (12:47 -0800)
commit5d91669309d23383651c352abd00254982e31902
treea8774d7cfc42b96bba4d130c760267a0366bb923
parent7d50d34fc7d9764766c13eb4f86171f241664b98
remote-curl: reduce scope of rpc_state.stdin_preamble

The stdin_preamble field in struct rpc_state is only used in
rpc_service(), and not in any functions it directly or indirectly calls.
Refactor it to become an argument of rpc_service() instead.

An observation of all callers of rpc_service() shows that the preamble
is always set, so we no longer need the "if (preamble)" check.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-curl.c