Merge branch 'jt/connectivity-check-after-unshallow'
authorJunio C Hamano <gitster@pobox.com>
Wed, 15 Aug 2018 22:08:28 +0000 (15:08 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Aug 2018 22:08:28 +0000 (15:08 -0700)
"git fetch" sometimes failed to update the remote-tracking refs,
which has been corrected.

* jt/connectivity-check-after-unshallow:
fetch-pack: unify ref in and out param

1  2 
builtin/clone.c
builtin/fetch.c
fetch-pack.c
t/t5551-http-fetch-smart.sh
transport-helper.c
transport.c
transport.h
diff --cc builtin/clone.c
Simple merge
diff --cc builtin/fetch.c
Simple merge
diff --cc fetch-pack.c
index 1ab0b2d37e78456db4e54bd83ade79299a71d821,660259e6b2a875cd49208d7c01de0708c57a67a4..f80a7acdf3b3edd7425a56434c9fae6adcc4f9bd
@@@ -1284,20 -1345,20 +1285,20 @@@ static void receive_wanted_refs(struct 
        while (packet_reader_read(reader) == PACKET_READ_NORMAL) {
                struct object_id oid;
                const char *end;
-               struct ref *r = NULL;
+               int i;
  
                if (parse_oid_hex(reader->line, &oid, &end) || *end++ != ' ')
 -                      die("expected wanted-ref, got '%s'", reader->line);
 +                      die(_("expected wanted-ref, got '%s'"), reader->line);
  
-               for (r = refs; r; r = r->next) {
-                       if (!strcmp(end, r->name)) {
-                               oidcpy(&r->old_oid, &oid);
+               for (i = 0; i < nr_sought; i++) {
+                       if (!strcmp(end, sought[i]->name)) {
+                               oidcpy(&sought[i]->old_oid, &oid);
                                break;
                        }
                }
  
-               if (!r)
+               if (i == nr_sought)
 -                      die("unexpected wanted-ref: '%s'", reader->line);
 +                      die(_("unexpected wanted-ref: '%s'"), reader->line);
        }
  
        if (reader->status != PACKET_READ_DELIM)
Simple merge
Simple merge
diff --cc transport.c
Simple merge
diff --cc transport.h
Simple merge