Thread (89 messages) 89 messages, 3 authors, 2016-06-15

[PATCH 31/86] send-pack: replace prefixcmd() with has_prefix()

STALE3764d

From: Christian Couder <hidden>
Date: 2016-06-15 22:59:12
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Christian Couder <redacted>
---
 send-pack.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/send-pack.c b/send-pack.c
index b228d65..c90049a 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -109,7 +109,7 @@ static int receive_status(int in, struct ref *refs)
 	struct ref *hint;
 	int ret = 0;
 	char *line = packet_read_line(in, NULL);
-	if (prefixcmp(line, "unpack "))
+	if (!has_prefix(line, "unpack "))
 		return error("did not receive remote status");
 	if (strcmp(line, "unpack ok")) {
 		error("unpack failed: %s", line + 7);
@@ -122,7 +122,7 @@ static int receive_status(int in, struct ref *refs)
 		line = packet_read_line(in, NULL);
 		if (!line)
 			break;
-		if (prefixcmp(line, "ok ") && prefixcmp(line, "ng ")) {
+		if (!has_prefix(line, "ok ") && !has_prefix(line, "ng ")) {
 			error("invalid ref status from remote: %s", line);
 			ret = -1;
 			break;
-- 
1.8.4.1.566.geca833c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help