aboutsummaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorLars Schneider <larsxschneider@gmail.com>2016-10-16 16:20:29 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-17 11:36:50 -0700
commit81c634e94f2fef0cec295f7554080c82bd6aeeb7 (patch)
treeee53d4aa768f496f3f34f9945e0ff3266340d14d /shallow.c
parentac2fbaa674ce3d5b5faf6a83f88cc4af1654f9cd (diff)
downloadgit-81c634e94f2fef0cec295f7554080c82bd6aeeb7.tar.gz
git-81c634e94f2fef0cec295f7554080c82bd6aeeb7.tar.xz
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 'shallow.c')
-rw-r--r--shallow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shallow.c b/shallow.c
index 54e2db733..d666e24f1 100644
--- a/shallow.c
+++ b/shallow.c
@@ -260,7 +260,7 @@ static int advertise_shallow_grafts_cb(const struct commit_graft *graft, void *c
{
int fd = *(int *)cb;
if (graft->nr_parent == -1)
- packet_write(fd, "shallow %s\n", oid_to_hex(&graft->oid));
+ packet_write_fmt(fd, "shallow %s\n", oid_to_hex(&graft->oid));
return 0;
}