Code

describe: Use for_each_rawref
authorAnders Kaseorg <andersk@ksplice.com>
Thu, 9 Dec 2010 06:42:25 +0000 (01:42 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Dec 2010 19:20:25 +0000 (11:20 -0800)
Don't waste time checking for dangling refs; they wouldn't affect the
output of 'git describe' anyway.  Although this does not gain much
performance by itself, it does in conjunction with the next commits.

Signed-off-by: Anders Kaseorg <andersk@ksplice.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/describe.c

index 43caff2ffe185df6ab224b93b4fd9ce3d82de2d0..700f74015460b8cdae9ba2d5be4607310af144c0 100644 (file)
@@ -418,7 +418,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
                return cmd_name_rev(i + argc, args, prefix);
        }
 
-       for_each_ref(get_name, NULL);
+       for_each_rawref(get_name, NULL);
        if (!found_names && !always)
                die("No names found, cannot describe anything.");