summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 40dae30)
raw | patch | inline | side by side (parent: 40dae30)
author | Junio C Hamano <gitster@pobox.com> | |
Sat, 13 Feb 2010 19:38:42 +0000 (11:38 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 13 Feb 2010 19:38:42 +0000 (11:38 -0800) |
Instead of iterating over the parsed atoms that are used in the output
format after all the parsing is done, check it while parsing the
format string.
format after all the parsing is done, check it while parsing the
format string.
builtin-for-each-ref.c | patch | blob | history |
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index 3698e822c8356f197d71bd703ffee6deccb30a82..d68977ee63c6ad604e7d98c9966909c708ba7b9b 100644 (file)
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
(sizeof(*used_atom_type) * used_atom_cnt));
used_atom[at] = xmemdupz(atom, ep - atom);
used_atom_type[at] = valid_atom[i].cmp_type;
+ if (*atom == '*')
+ need_tagged = 1;
return at;
}
refs = cbdata.grab_array;
num_refs = cbdata.grab_cnt;
- for (i = 0; i < used_atom_cnt; i++) {
- if (used_atom[i][0] == '*') {
- need_tagged = 1;
- break;
- }
- }
-
sort_refs(sort, refs, num_refs);
if (!maxcount || num_refs < maxcount)