Skip to content

Commit

Permalink
describe: Use for_each_rawref
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anders Kaseorg authored and Junio C Hamano committed Dec 9, 2010
1 parent 6079ec6 commit 56a5f3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/describe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.");

Expand Down

0 comments on commit 56a5f3a

Please sign in to comment.