]> git.lizzy.rs Git - plan9front.git/commitdiff
git/serve: add a '\n' after HEAD
authorOri Bernstein <ori@eigenstate.org>
Wed, 25 Aug 2021 22:15:34 +0000 (22:15 +0000)
committerOri Bernstein <ori@eigenstate.org>
Wed, 25 Aug 2021 22:15:34 +0000 (22:15 +0000)
Per the docs:

the sender SHOULD include a LF, but the
receiver MUST NOT complain if it is not
present.

I typoed away the SHOULD, and got missed the
MUST NOT.

thanks qbit.

sys/src/cmd/git/serve.c

index 16eb341894f49ad8b2edf2146a80c7d0803cada2..bf2e037700cf3ad7c02b6baafc2bae59a54a3650 100644 (file)
@@ -34,7 +34,7 @@ showrefs(Conn *c)
        refs = nil;
        names = nil;
        if(resolveref(&head, "HEAD") != -1)
-               if(fmtpkt(c, "%H HEAD", head) == -1)
+               if(fmtpkt(c, "%H HEAD\n", head) == -1)
                        goto error;
 
        if((nrefs = listrefs(&refs, &names)) == -1)