Thread (100 messages) flat view 100 messages, 7 authors, 2018-07-23

Re: [PATCH v2 8/8] fetch-pack: implement ref-in-want

From: Jonathan Nieder <hidden>
Date: 2018-06-22 22:29:09

Hi,

Brandon Williams wrote:
On 06/14, Stefan Beller wrote:
quoted
On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams [off-list ref] wrote:
quoted
quoted
+               for (r = refs; r; r = r->next) {
+                       if (!strcmp(end, r->name)) {
+                               oidcpy(&r->old_oid, &oid);
+                               break;
+                       }
+               }
The server is documented as MUST NOT send additional refs,
which is fine here, as we'd have no way of storing them anyway.
Do we want to issue a warning, though?

    if (!r) /* never break'd */
        warning ("server send unexpected line '%s'", reader.line);
Depends, does this warning help out the end user or do you think it
would confuse users to see this and still have their fetch succeed?
I think we'd want to error out instead of warning.  That keeps the
spec simple and that way, server implementors will notice early if
they are doing something that clients aren't going to understand
anyway, which would benefit users.

Thanks,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help