diff options
author | Lars Schneider <larsxschneider@gmail.com> | 2016-10-17 01:20:29 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-17 20:36:50 +0200 |
commit | 81c634e94f2fef0cec295f7554080c82bd6aeeb7 (patch) | |
tree | ee53d4aa768f496f3f34f9945e0ff3266340d14d /builtin/archive.c | |
parent | run-command: add clean_on_exit_handler (diff) | |
download | git-81c634e94f2fef0cec295f7554080c82bd6aeeb7.tar.xz git-81c634e94f2fef0cec295f7554080c82bd6aeeb7.zip |
pkt-line: rename packet_write() to packet_write_fmt()
packet_write() should be called packet_write_fmt() because it is a
printf-like function that takes a format string as first parameter.
packet_write_fmt() should be used for text strings only. Arbitrary
binary data should use a new packet_write() function that is introduced
in a subsequent patch.
Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/archive.c')
-rw-r--r-- | builtin/archive.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/archive.c b/builtin/archive.c index a1e3b940c2..49f491413a 100644 --- a/builtin/archive.c +++ b/builtin/archive.c @@ -47,10 +47,10 @@ static int run_remote_archiver(int argc, const char **argv, if (name_hint) { const char *format = archive_format_from_filename(name_hint); if (format) - packet_write(fd[1], "argument --format=%s\n", format); + packet_write_fmt(fd[1], "argument --format=%s\n", format); } for (i = 1; i < argc; i++) - packet_write(fd[1], "argument %s\n", argv[i]); + packet_write_fmt(fd[1], "argument %s\n", argv[i]); packet_flush(fd[1]); buf = packet_read_line(fd[0], NULL); |