Merge branch 'kn/ref-filter-branch-list'
[gitweb.git] / builtin / describe.c
index a5cd8c513f96baaaa0d9a310e2bf02b8db41199b..19eacdd170d98ea583cc2eb373247df600be24d7 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "config.h"
 #include "lockfile.h"
 #include "commit.h"
 #include "tag.h"
@@ -79,13 +80,13 @@ static int replace_name(struct commit_name *e,
                struct tag *t;
 
                if (!e->tag) {
-                       t = lookup_tag(e->oid.hash);
+                       t = lookup_tag(&e->oid);
                        if (!t || parse_tag(t))
                                return 1;
                        e->tag = t;
                }
 
-               t = lookup_tag(oid->hash);
+               t = lookup_tag(oid);
                if (!t || parse_tag(t))
                        return 0;
                *tag = t;
@@ -142,7 +143,7 @@ static int get_name(const char *path, const struct object_id *oid, int flag, voi
                        return 0;
 
                for_each_string_list_item(item, &exclude_patterns) {
-                       if (!wildmatch(item->string, path + 10, 0, NULL))
+                       if (!wildmatch(item->string, path + 10, 0))
                                return 0;
                }
        }
@@ -158,7 +159,7 @@ static int get_name(const char *path, const struct object_id *oid, int flag, voi
                        return 0;
 
                for_each_string_list_item(item, &patterns) {
-                       if (!wildmatch(item->string, path + 10, 0, NULL))
+                       if (!wildmatch(item->string, path + 10, 0))
                                break;
 
                        /* If we get here, no pattern matched. */
@@ -245,7 +246,7 @@ static unsigned long finish_depth_computation(
 static void display_name(struct commit_name *n)
 {
        if (n->prio == 2 && !n->tag) {
-               n->tag = lookup_tag(n->oid.hash);
+               n->tag = lookup_tag(&n->oid);
                if (!n->tag || parse_tag(n->tag))
                        die(_("annotated tag %s not available"), n->path);
        }
@@ -281,7 +282,7 @@ static void describe(const char *arg, int last_one)
 
        if (get_oid(arg, &oid))
                die(_("Not a valid object name %s"), arg);
-       cmit = lookup_commit_reference(oid.hash);
+       cmit = lookup_commit_reference(&oid);
        if (!cmit)
                die(_("%s is not a valid '%s' object"), arg, commit_type);
 
@@ -309,7 +310,7 @@ static void describe(const char *arg, int last_one)
                struct commit *c;
                struct commit_name *n = hashmap_iter_first(&names, &iter);
                for (; n; n = hashmap_iter_next(&iter)) {
-                       c = lookup_commit_reference_gently(n->peeled.hash, 1);
+                       c = lookup_commit_reference_gently(&n->peeled, 1);
                        if (c)
                                c->util = n;
                }