Skip to content

Commit 4a1b59c

Browse files
felipecgitster
authored andcommitted
transport-helper: remove barely used xchgline()
It's only used once, we can just call the two functions inside directly. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 68773ac commit 4a1b59c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

transport-helper.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ static int recvline(struct helper_data *helper, struct strbuf *buffer)
7171
return recvline_fh(helper->out, buffer, helper->name);
7272
}
7373

74-
static void xchgline(struct helper_data *helper, struct strbuf *buffer)
75-
{
76-
sendline(helper, buffer);
77-
recvline(helper, buffer);
78-
}
79-
8074
static void write_constant(int fd, const char *str)
8175
{
8276
if (debug)
@@ -307,7 +301,8 @@ static int set_helper_option(struct transport *transport,
307301
quote_c_style(value, &buf, NULL, 0);
308302
strbuf_addch(&buf, '\n');
309303

310-
xchgline(data, &buf);
304+
sendline(data, &buf);
305+
recvline(data, &buf);
311306

312307
if (!strcmp(buf.buf, "ok"))
313308
ret = 0;

0 commit comments

Comments
 (0)