diff --git a/builtin-describe.c b/builtin-describe.c
index df554b30af3ddcb4d0141838c06f82d433cbf3a4..e515f9ca9b5d0ec13e96a7866e27bdd9e852b435 100644 (file)
--- a/builtin-describe.c
+++ b/builtin-describe.c
* Otherwise only annotated tags are used.
*/
if (might_be_tag) {
* Otherwise only annotated tags are used.
*/
if (might_be_tag) {
- if (is_tag) {
+ if (is_tag)
prio = 2;
prio = 2;
- if (pattern && fnmatch(pattern, path + 10, 0))
- prio = 0;
- } else
+ else
prio = 1;
prio = 1;
+
+ if (pattern && fnmatch(pattern, path + 10, 0))
+ prio = 0;
}
else
prio = 0;
}
else
prio = 0;
*/
display_name(n);
if (longformat)
*/
display_name(n);
if (longformat)
- show_suffix(0, n->tag->tagged->sha1);
+ show_suffix(0, n->tag ? n->tag->tagged->sha1 : sha1);
printf("\n");
return;
}
printf("\n");
return;
}