]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-clone.c
git: update to v2.46.0
[ps-cgit] / ui-clone.c
index 6ba8f361e6ae63bf13de716a16957c3bbe73f58a..df196a04614cc5a9aae44e8beb8b2398d3c88c80 100644 (file)
@@ -7,6 +7,8 @@
  *   (see COPYING for full license text)
  */
 
  *   (see COPYING for full license text)
  */
 
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "cgit.h"
 #include "ui-clone.h"
 #include "html.h"
 #include "cgit.h"
 #include "ui-clone.h"
 #include "html.h"
@@ -19,12 +21,12 @@ static int print_ref_info(const char *refname, const struct object_id *oid,
 {
        struct object *obj;
 
 {
        struct object *obj;
 
-       if (!(obj = parse_object(oid)))
+       if (!(obj = parse_object(the_repository, oid)))
                return 0;
 
        htmlf("%s\t%s\n", oid_to_hex(oid), refname);
        if (obj->type == OBJ_TAG) {
                return 0;
 
        htmlf("%s\t%s\n", oid_to_hex(oid), refname);
        if (obj->type == OBJ_TAG) {
-               if (!(obj = deref_tag(obj, refname, 0)))
+               if (!(obj = deref_tag(the_repository, obj, refname, 0)))
                        return 0;
                htmlf("%s\t%s^{}\n", oid_to_hex(&obj->oid), refname);
        }
                        return 0;
                htmlf("%s\t%s^{}\n", oid_to_hex(&obj->oid), refname);
        }
@@ -87,7 +89,8 @@ void cgit_clone_info(void)
        ctx.page.mimetype = "text/plain";
        ctx.page.filename = "info/refs";
        cgit_print_http_headers();
        ctx.page.mimetype = "text/plain";
        ctx.page.filename = "info/refs";
        cgit_print_http_headers();
-       for_each_ref(print_ref_info, NULL);
+       refs_for_each_ref(get_main_ref_store(the_repository),
+                         print_ref_info, NULL);
 }
 
 void cgit_clone_objects(void)
 }
 
 void cgit_clone_objects(void)