]> git.ipfire.org Git - thirdparty/git.git/blobdiff - fetch-pack.c
correct error messages for NULL packet_read_line()
[thirdparty/git.git] / fetch-pack.c
index 9f6b07ad91f8c2c17e85004a0e71a8b69752d120..54acb421ae17c1ed03d8889b4aa4176a338c7d20 100644 (file)
@@ -260,8 +260,8 @@ static enum ack_type get_ack(int fd, struct object_id *result_oid)
        char *line = packet_read_line(fd, &len);
        const char *arg;
 
-       if (!len)
-               die(_("git fetch-pack: expected ACK/NAK, got EOF"));
+       if (!line)
+               die(_("git fetch-pack: expected ACK/NAK, got a flush packet"));
        if (!strcmp(line, "NAK"))
                return NAK;
        if (skip_prefix(line, "ACK ", &arg)) {