]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'fc/fetch-with-import-fix'
authorJunio C Hamano <gitster@pobox.com>
Tue, 9 Jul 2019 22:25:34 +0000 (15:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Jul 2019 22:25:34 +0000 (15:25 -0700)
Code restructuring during 2.20 period broke fetching tags via
"import" based transports.

* fc/fetch-with-import-fix:
  fetch: fix regression with transport helpers
  fetch: make the code more understandable
  fetch: trivial cleanup
  t5801 (remote-helpers): add test to fetch tags
  t5801 (remote-helpers): cleanup refspec stuff

1  2 
builtin/fetch.c
t/t5801-remote-helpers.sh
t/t5801/git-remote-testgit

diff --cc builtin/fetch.c
index 4ba63d5ac642844832a5c832cea93ddf99507764,e485d429c9e7f580010a4ee6a011106954d17ad5..f2be50a4a3cf4291fd2ea40e2bd33db417925f44
@@@ -317,9 -321,10 +323,9 @@@ static void find_non_local_tags(const s
                            !has_object_file_with_flags(&ref->old_oid,
                                                        OBJECT_INFO_QUICK) &&
                            !will_fetch(head, ref->old_oid.hash) &&
 -                          !has_sha1_file_with_flags(item->oid.hash,
 -                                                    OBJECT_INFO_QUICK) &&
 +                          !has_object_file_with_flags(&item->oid, OBJECT_INFO_QUICK) &&
                            !will_fetch(head, item->oid.hash))
-                               oidclr(&item->oid);
+                               clear_item(item);
                        item = NULL;
                        continue;
                }
                 * fetch.
                 */
                if (item &&
 -                  !has_sha1_file_with_flags(item->oid.hash, OBJECT_INFO_QUICK) &&
 +                  !has_object_file_with_flags(&item->oid, OBJECT_INFO_QUICK) &&
                    !will_fetch(head, item->oid.hash))
-                       oidclr(&item->oid);
+                       clear_item(item);
  
                item = NULL;
  
         * checked to see if it needs fetching.
         */
        if (item &&
 -          !has_sha1_file_with_flags(item->oid.hash, OBJECT_INFO_QUICK) &&
 +          !has_object_file_with_flags(&item->oid, OBJECT_INFO_QUICK) &&
            !will_fetch(head, item->oid.hash))
-               oidclr(&item->oid);
+               clear_item(item);
  
        /*
         * For all the tags in the remote_refs_list,
Simple merge
Simple merge