ident.c: add support for IPv6
[gitweb.git] / builtin / show-ref.c
index 18f84fbc53883ceb30564b44e604361857aa9f33..131ef28e5cb5d0a08bc00a7ad99e137bdd44eb66 100644 (file)
@@ -8,7 +8,7 @@
 
 static const char * const show_ref_usage[] = {
        N_("git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...]"),
-       N_("git show-ref --exclude-existing[=pattern] < ref-list"),
+       N_("git show-ref --exclude-existing[=<pattern>] < <ref-list>"),
        NULL
 };
 
@@ -30,7 +30,7 @@ static int show_ref(const char *refname, const struct object_id *oid,
                    int flag, void *cbdata)
 {
        const char *hex;
-       unsigned char peeled[20];
+       struct object_id peeled;
 
        if (show_head && !strcmp(refname, "HEAD"))
                goto match;
@@ -82,8 +82,8 @@ static int show_ref(const char *refname, const struct object_id *oid,
        if (!deref_tags)
                return 0;
 
-       if (!peel_ref(refname, peeled)) {
-               hex = find_unique_abbrev(peeled, abbrev);
+       if (!peel_ref(refname, peeled.hash)) {
+               hex = find_unique_abbrev(peeled.hash, abbrev);
                printf("%s %s^{}\n", hex, refname);
        }
        return 0;