Commit 13ce8c9368c159db1a4d9471a6cf7cf7cd83b73b

Stefan Sperling 2020-03-18T16:10:33

add missing space between first wanted hash and our capability string

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/libexec/got-fetch-pack/got-fetch-pack.c b/libexec/got-fetch-pack/got-fetch-pack.c
index 7ad3862..4fb6478 100644
--- a/libexec/got-fetch-pack/got-fetch-pack.c
+++ b/libexec/got-fetch-pack/got-fetch-pack.c
@@ -473,7 +473,8 @@ fetch_pack(int fd, int packfd, struct got_object_id *packid,
 		if (got_has_object(&want[i]))
 			continue;
 		got_sha1_digest_to_str(want[i].sha1, hashstr, sizeof(hashstr));
-		n = snprintf(buf, sizeof(buf), "want %s%s\n", hashstr,
+		n = snprintf(buf, sizeof(buf), "want %s%s%s\n", hashstr,
+		   i == 0 && my_capabilities ? " " : "",
 		   i == 0 && my_capabilities ? my_capabilities : "");
 		if (n >= sizeof(buf)) {
 			err = got_error(GOT_ERR_NO_SPACE);