Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
transport-helper: remove barely used xchgline()
author
Felipe Contreras
<felipe.contreras@gmail.com>
Sat, 12 Apr 2014 20:33:28 +0000
(15:33 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 14 Apr 2014 20:48:17 +0000
(13:48 -0700)
It's only used once, we can just call the two functions inside directly.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport-helper.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
68773ac
)
diff --git
a/transport-helper.c
b/transport-helper.c
index 86e1679c1e0e1e58ebe5297f4c5f48ca1a1f6418..892107c734ae22d0051fbc3ce53ce40ba9280d54 100644
(file)
--- a/
transport-helper.c
+++ b/
transport-helper.c
@@
-71,12
+71,6
@@
static int recvline(struct helper_data *helper, struct strbuf *buffer)
return recvline_fh(helper->out, buffer, helper->name);
}
-static void xchgline(struct helper_data *helper, struct strbuf *buffer)
-{
- sendline(helper, buffer);
- recvline(helper, buffer);
-}
-
static void write_constant(int fd, const char *str)
{
if (debug)
@@
-307,7
+301,8
@@
static int set_helper_option(struct transport *transport,
quote_c_style(value, &buf, NULL, 0);
strbuf_addch(&buf, '\n');
- xchgline(data, &buf);
+ sendline(data, &buf);
+ recvline(data, &buf);
if (!strcmp(buf.buf, "ok"))
ret = 0;