summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cd03eeb)
raw | patch | inline | side by side (parent: cd03eeb)
author | Jim Meyering <jim@meyering.net> | |
Sat, 12 Sep 2009 08:54:32 +0000 (10:54 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 13 Sep 2009 08:32:04 +0000 (01:32 -0700) |
This is the same fix to use write_str_in_full() helper to write a constant
string out without counting the length of it ourselves.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
string out without counting the length of it ourselves.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport-helper.c | patch | blob | history |
diff --git a/transport-helper.c b/transport-helper.c
index b1ea7e6f40d94822f2e146cd9c615f607aa11d77..832d81f231d54e62a1dea5205585b0caa7954436 100644 (file)
--- a/transport-helper.c
+++ b/transport-helper.c
die("Unable to run helper: git %s", helper->argv[0]);
data->helper = helper;
- strbuf_addstr(&buf, "capabilities\n");
- write_in_full(helper->in, buf.buf, buf.len);
- strbuf_reset(&buf);
+ write_str_in_full(helper->in, "capabilities\n");
file = fdopen(helper->out, "r");
while (1) {
{
struct helper_data *data = transport->data;
if (data->helper) {
- write_in_full(data->helper->in, "\n", 1);
+ write_str_in_full(data->helper->in, "\n");
close(data->helper->in);
finish_command(data->helper);
free((char *)data->helper->argv[0]);
helper = get_helper(transport);
- strbuf_addstr(&buf, "list\n");
- write_in_full(helper->in, buf.buf, buf.len);
- strbuf_reset(&buf);
+ write_str_in_full(helper->in, "list\n");
file = fdopen(helper->out, "r");
while (1) {