Merge branch 'nd/submodule-unused-vars'
authorJunio C Hamano <gitster@pobox.com>
Tue, 6 Nov 2018 06:50:20 +0000 (15:50 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Nov 2018 06:50:20 +0000 (15:50 +0900)
Code clean-up.

* nd/submodule-unused-vars:
submodule.c: remove some of the_repository references

1  2 
transport.c
diff --combined transport.c
index 01ce11a32575fc8ca889ba99f610983ef150688d,f9343e6dde5bfa3c72a089543d9726529d0f84ba..5a74b609ffad51752ec91cc93c602f00292288d1
@@@ -1172,7 -1172,7 +1172,7 @@@ int transport_push(struct transport *tr
                                        oid_array_append(&commits,
                                                          &ref->new_oid);
  
-                       if (!push_unpushed_submodules(&the_index,
+                       if (!push_unpushed_submodules(the_repository,
                                                      &commits,
                                                      transport->remote,
                                                      rs,
                                        oid_array_append(&commits,
                                                          &ref->new_oid);
  
-                       if (find_unpushed_submodules(&the_index,
+                       if (find_unpushed_submodules(the_repository,
                                                     &commits,
                                                     transport->remote->name,
                                                     &needs_pushing)) {
@@@ -1413,9 -1413,9 +1413,9 @@@ static void read_alternate_refs(const c
        fh = xfdopen(cmd.out, "r");
        while (strbuf_getline_lf(&line, fh) != EOF) {
                struct object_id oid;
 +              const char *p;
  
 -              if (get_oid_hex(line.buf, &oid) ||
 -                  line.buf[GIT_SHA1_HEXSZ]) {
 +              if (parse_oid_hex(line.buf, &oid, &p) || *p) {
                        warning(_("invalid line while parsing alternate refs: %s"),
                                line.buf);
                        break;