l10n: zh_CN: Update Git Glossary: "dumb", "smart"
[gitweb.git] / http-backend.c
index 6bf139b76873bd8553652a4658e6629b24aeeacb..501bf797c0658e33aa8215562c44f0dec9eea75e 100644 (file)
@@ -421,16 +421,16 @@ static void run_service(const char **argv, int buffer_input)
                exit(1);
 }
 
-static int show_text_ref(const char *name, const unsigned char *sha1,
-       int flag, void *cb_data)
+static int show_text_ref(const char *name, const struct object_id *oid,
+                        int flag, void *cb_data)
 {
        const char *name_nons = strip_namespace(name);
        struct strbuf *buf = cb_data;
-       struct object *o = parse_object(sha1);
+       struct object *o = parse_object(oid->hash);
        if (!o)
                return 0;
 
-       strbuf_addf(buf, "%s\t%s\n", sha1_to_hex(sha1), name_nons);
+       strbuf_addf(buf, "%s\t%s\n", oid_to_hex(oid), name_nons);
        if (o->type == OBJ_TAG) {
                o = deref_tag(o, name, 0);
                if (!o)
@@ -473,21 +473,21 @@ static void get_info_refs(char *arg)
        strbuf_release(&buf);
 }
 
-static int show_head_ref(const char *refname, const unsigned char *sha1,
-       int flag, void *cb_data)
+static int show_head_ref(const char *refname, const struct object_id *oid,
+                        int flag, void *cb_data)
 {
        struct strbuf *buf = cb_data;
 
        if (flag & REF_ISSYMREF) {
-               unsigned char unused[20];
+               struct object_id unused;
                const char *target = resolve_ref_unsafe(refname,
                                                        RESOLVE_REF_READING,
-                                                       unused, NULL);
+                                                       unused.hash, NULL);
                const char *target_nons = strip_namespace(target);
 
                strbuf_addf(buf, "ref: %s\n", target_nons);
        } else {
-               strbuf_addf(buf, "%s\n", sha1_to_hex(sha1));
+               strbuf_addf(buf, "%s\n", oid_to_hex(oid));
        }
 
        return 0;