completion: support excluding refs
[gitweb.git] / server-info.c
index c82e9ee3964a17b23809c28d7cd14961e3e61d87..75dd6774136258c677fe4f4bbe2124c83b4cea68 100644 (file)
@@ -36,7 +36,7 @@ static int update_info_file(char *path, int (*generate)(FILE *))
 
 out:
        if (ret) {
-               error("unable to update %s: %s", path, strerror(errno));
+               error_errno("unable to update %s", path);
                if (fp)
                        fclose(fp);
                else if (fd >= 0)
@@ -62,7 +62,7 @@ static int add_info_ref(const char *path, const struct object_id *oid,
                o = deref_tag(o, path, 0);
                if (o)
                        if (fprintf(fp, "%s     %s^{}\n",
-                               sha1_to_hex(o->sha1), path) < 0)
+                               oid_to_hex(&o->oid), path) < 0)
                                return -1;
        }
        return 0;